diff options
Diffstat (limited to 'drivers/ide/setup-pci.c')
-rw-r--r-- | drivers/ide/setup-pci.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 18ed7765417c..7ebf992e8c2f 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -787,8 +787,9 @@ static int pre_init = 1; /* Before first ordered IDE scan */ | |||
787 | static LIST_HEAD(ide_pci_drivers); | 787 | static LIST_HEAD(ide_pci_drivers); |
788 | 788 | ||
789 | /* | 789 | /* |
790 | * ide_register_pci_driver - attach IDE driver | 790 | * __ide_pci_register_driver - attach IDE driver |
791 | * @driver: pci driver | 791 | * @driver: pci driver |
792 | * @module: owner module of the driver | ||
792 | * | 793 | * |
793 | * Registers a driver with the IDE layer. The IDE layer arranges that | 794 | * Registers a driver with the IDE layer. The IDE layer arranges that |
794 | * boot time setup is done in the expected device order and then | 795 | * boot time setup is done in the expected device order and then |
@@ -801,15 +802,16 @@ static LIST_HEAD(ide_pci_drivers); | |||
801 | * Returns are the same as for pci_register_driver | 802 | * Returns are the same as for pci_register_driver |
802 | */ | 803 | */ |
803 | 804 | ||
804 | int ide_pci_register_driver(struct pci_driver *driver) | 805 | int __ide_pci_register_driver(struct pci_driver *driver, struct module *module) |
805 | { | 806 | { |
806 | if(!pre_init) | 807 | if(!pre_init) |
807 | return pci_module_init(driver); | 808 | return __pci_register_driver(driver, module); |
809 | driver->driver.owner = module; | ||
808 | list_add_tail(&driver->node, &ide_pci_drivers); | 810 | list_add_tail(&driver->node, &ide_pci_drivers); |
809 | return 0; | 811 | return 0; |
810 | } | 812 | } |
811 | 813 | ||
812 | EXPORT_SYMBOL_GPL(ide_pci_register_driver); | 814 | EXPORT_SYMBOL_GPL(__ide_pci_register_driver); |
813 | 815 | ||
814 | /** | 816 | /** |
815 | * ide_unregister_pci_driver - unregister an IDE driver | 817 | * ide_unregister_pci_driver - unregister an IDE driver |
@@ -897,6 +899,6 @@ void __init ide_scan_pcibus (int scan_direction) | |||
897 | { | 899 | { |
898 | list_del(l); | 900 | list_del(l); |
899 | d = list_entry(l, struct pci_driver, node); | 901 | d = list_entry(l, struct pci_driver, node); |
900 | pci_register_driver(d); | 902 | __pci_register_driver(d, d->driver.owner); |
901 | } | 903 | } |
902 | } | 904 | } |