diff options
Diffstat (limited to 'drivers/ide/pci/it821x.c')
-rw-r--r-- | drivers/ide/pci/it821x.c | 16 |
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 | ||
668 | static 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 | |||
668 | static const struct pci_device_id it821x_pci_tbl[] = { | 677 | static 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 | ||
682 | static int __init it821x_ide_init(void) | 692 | static 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 | ||
697 | static void __exit it821x_ide_exit(void) | ||
698 | { | ||
699 | pci_unregister_driver(&driver); | ||
700 | } | ||
701 | |||
687 | module_init(it821x_ide_init); | 702 | module_init(it821x_ide_init); |
703 | module_exit(it821x_ide_exit); | ||
688 | 704 | ||
689 | module_param_named(noraid, it8212_noraid, int, S_IRUGO); | 705 | module_param_named(noraid, it8212_noraid, int, S_IRUGO); |
690 | MODULE_PARM_DESC(noraid, "Force card into bypass mode"); | 706 | MODULE_PARM_DESC(noraid, "Force card into bypass mode"); |