diff options
Diffstat (limited to 'drivers/pci/pci-driver.c')
-rw-r--r-- | drivers/pci/pci-driver.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c index 92d5e8db0de7..4438ae1ede4f 100644 --- a/drivers/pci/pci-driver.c +++ b/drivers/pci/pci-driver.c | |||
@@ -324,8 +324,7 @@ static int pci_default_resume(struct pci_dev *pci_dev) | |||
324 | /* restore the PCI config space */ | 324 | /* restore the PCI config space */ |
325 | pci_restore_state(pci_dev); | 325 | pci_restore_state(pci_dev); |
326 | /* if the device was enabled before suspend, reenable */ | 326 | /* if the device was enabled before suspend, reenable */ |
327 | if (atomic_read(&pci_dev->enable_cnt)) | 327 | retval = __pci_reenable_device(pci_dev); |
328 | retval = __pci_enable_device(pci_dev); | ||
329 | /* if the device was busmaster before the suspend, make it busmaster again */ | 328 | /* if the device was busmaster before the suspend, make it busmaster again */ |
330 | if (pci_dev->is_busmaster) | 329 | if (pci_dev->is_busmaster) |
331 | pci_set_master(pci_dev); | 330 | pci_set_master(pci_dev); |
@@ -422,7 +421,8 @@ static struct kobj_type pci_driver_kobj_type = { | |||
422 | * If no error occurred, the driver remains registered even if | 421 | * If no error occurred, the driver remains registered even if |
423 | * no device was claimed during registration. | 422 | * no device was claimed during registration. |
424 | */ | 423 | */ |
425 | int __pci_register_driver(struct pci_driver *drv, struct module *owner) | 424 | int __pci_register_driver(struct pci_driver *drv, struct module *owner, |
425 | const char *mod_name) | ||
426 | { | 426 | { |
427 | int error; | 427 | int error; |
428 | 428 | ||
@@ -430,6 +430,7 @@ int __pci_register_driver(struct pci_driver *drv, struct module *owner) | |||
430 | drv->driver.name = drv->name; | 430 | drv->driver.name = drv->name; |
431 | drv->driver.bus = &pci_bus_type; | 431 | drv->driver.bus = &pci_bus_type; |
432 | drv->driver.owner = owner; | 432 | drv->driver.owner = owner; |
433 | drv->driver.mod_name = mod_name; | ||
433 | drv->driver.kobj.ktype = &pci_driver_kobj_type; | 434 | drv->driver.kobj.ktype = &pci_driver_kobj_type; |
434 | 435 | ||
435 | if (pci_multithread_probe) | 436 | if (pci_multithread_probe) |