diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2010-01-08 00:11:01 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-01-08 00:11:01 -0800 |
commit | 4cd7d9247ffa2a27508c69563b66713519c196f5 (patch) | |
tree | d5e53ea77ea8007108b2fd6f4c1771b6ce224acc | |
parent | 1c8a375185935f8106a45221bd187b7b272f97c2 (diff) | |
download | kernel_samsung_smdk4412-4cd7d9247ffa2a27508c69563b66713519c196f5.zip kernel_samsung_smdk4412-4cd7d9247ffa2a27508c69563b66713519c196f5.tar.gz kernel_samsung_smdk4412-4cd7d9247ffa2a27508c69563b66713519c196f5.tar.bz2 |
scc_pata: fix module unloading
scc_pata host driver predated module unloading support for IDE host
drivers so even though it supports PCI hot-unplug and implements
PCI device ->remove method it doesn't allow module removal. Fix it.
Add missing __init/__exit tags to module_init/module_exit functions
while at it (from Peter Huewe).
Noticed-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/ide/scc_pata.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/ide/scc_pata.c b/drivers/ide/scc_pata.c index 1104bb3..8066168 100644 --- a/drivers/ide/scc_pata.c +++ b/drivers/ide/scc_pata.c @@ -872,20 +872,18 @@ static struct pci_driver scc_pci_driver = { .remove = __devexit_p(scc_remove), }; -static int scc_ide_init(void) +static int __init scc_ide_init(void) { return ide_pci_register_driver(&scc_pci_driver); } -module_init(scc_ide_init); -/* -- No exit code? -static void scc_ide_exit(void) +static void __exit scc_ide_exit(void) { - ide_pci_unregister_driver(&scc_pci_driver); + pci_unregister_driver(&scc_pci_driver); } -module_exit(scc_ide_exit); - */ +module_init(scc_ide_init); +module_exit(scc_ide_exit); MODULE_DESCRIPTION("PCI driver module for Toshiba SCC IDE"); MODULE_LICENSE("GPL"); |