#include <linux/pci.h>
#include <linux/init.h>
#include <linux/agp_backend.h>
+#include <linux/delay.h>
#include "agp.h"
#define SIS_ATTBASE 0x90
command |= AGPSTAT_AGP_ENABLE;
rate = (command & 0x7) << 2;
- while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) {
+ for_each_pci_dev(device) {
u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP);
if (!agp)
continue;
*/
if (device->device == agp_bridge->dev->device) {
printk(KERN_INFO PFX "SiS delay workaround: giving bridge time to recover.\n");
- set_current_state(TASK_UNINTERRUPTIBLE);
- schedule_timeout (1+(HZ*10)/1000);
+ msleep(10);
}
}
}
static int __init agp_sis_init(void)
{
+ if (agp_off)
+ return -EINVAL;
return pci_module_init(&agp_sis_pci_driver);
}