aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:22 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-24 16:53:22 -0400
commit87d8b61356108835f5e91c0fb32b830ec585978c (patch)
tree2bf0148d09b21244044ff45fc457d76fdda483ee /drivers/ide
parent5102f768570b3486979afb68c595b71cfb7f026f (diff)
it821x: add ->remove method and module_exit()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-rw-r--r--drivers/ide/pci/it821x.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c
index e63fdafe18fc..c5c91f2109d4 100644
--- a/drivers/ide/pci/it821x.c
+++ b/drivers/ide/pci/it821x.c
@@ -665,6 +665,15 @@ static int __devinit it821x_init_one(struct pci_dev *dev, const struct pci_devic
665 return rc; 665 return rc;
666} 666}
667 667
668static void __devexit it821x_remove(struct pci_dev *dev)
669{
670 struct ide_host *host = pci_get_drvdata(dev);
671 struct it821x_dev *itdevs = host->host_priv;
672
673 ide_pci_remove(dev);
674 kfree(itdevs);
675}
676
668static const struct pci_device_id it821x_pci_tbl[] = { 677static const struct pci_device_id it821x_pci_tbl[] = {
669 { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 }, 678 { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), 0 },
670 { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 }, 679 { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), 0 },
@@ -677,6 +686,7 @@ static struct pci_driver driver = {
677 .name = "ITE821x IDE", 686 .name = "ITE821x IDE",
678 .id_table = it821x_pci_tbl, 687 .id_table = it821x_pci_tbl,
679 .probe = it821x_init_one, 688 .probe = it821x_init_one,
689 .remove = it821x_remove,
680}; 690};
681 691
682static int __init it821x_ide_init(void) 692static int __init it821x_ide_init(void)
@@ -684,7 +694,13 @@ static int __init it821x_ide_init(void)
684 return ide_pci_register_driver(&driver); 694 return ide_pci_register_driver(&driver);
685} 695}
686 696
697static void __exit it821x_ide_exit(void)
698{
699 pci_unregister_driver(&driver);
700}
701
687module_init(it821x_ide_init); 702module_init(it821x_ide_init);
703module_exit(it821x_ide_exit);
688 704
689module_param_named(noraid, it8212_noraid, int, S_IRUGO); 705module_param_named(noraid, it8212_noraid, int, S_IRUGO);
690MODULE_PARM_DESC(noraid, "Force card into bypass mode"); 706MODULE_PARM_DESC(noraid, "Force card into bypass mode");