aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r--drivers/ide/pci/pdc202xx_new.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index 71a420feb981..9881a1a8b89c 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -543,6 +543,15 @@ static int __devinit pdc202new_init_one(struct pci_dev *dev, const struct pci_de
543 return ide_pci_init_one(dev, d, NULL); 543 return ide_pci_init_one(dev, d, NULL);
544} 544}
545 545
546static void __devexit pdc202new_remove(struct pci_dev *dev)
547{
548 struct ide_host *host = pci_get_drvdata(dev);
549 struct pci_dev *dev2 = host->dev[1] ? to_pci_dev(host->dev[1]) : NULL;
550
551 ide_pci_remove(dev);
552 pci_dev_put(dev2);
553}
554
546static const struct pci_device_id pdc202new_pci_tbl[] = { 555static const struct pci_device_id pdc202new_pci_tbl[] = {
547 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20268), 0 }, 556 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20268), 0 },
548 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20269), 1 }, 557 { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20269), 1 },
@@ -559,6 +568,7 @@ static struct pci_driver driver = {
559 .name = "Promise_IDE", 568 .name = "Promise_IDE",
560 .id_table = pdc202new_pci_tbl, 569 .id_table = pdc202new_pci_tbl,
561 .probe = pdc202new_init_one, 570 .probe = pdc202new_init_one,
571 .remove = pdc202new_remove,
562}; 572};
563 573
564static int __init pdc202new_ide_init(void) 574static int __init pdc202new_ide_init(void)
@@ -566,7 +576,13 @@ static int __init pdc202new_ide_init(void)
566 return ide_pci_register_driver(&driver); 576 return ide_pci_register_driver(&driver);
567} 577}
568 578
579static void __exit pdc202new_ide_exit(void)
580{
581 pci_unregister_driver(&driver);
582}
583
569module_init(pdc202new_ide_init); 584module_init(pdc202new_ide_init);
585module_exit(pdc202new_ide_exit);
570 586
571MODULE_AUTHOR("Andre Hedrick, Frank Tiernan"); 587MODULE_AUTHOR("Andre Hedrick, Frank Tiernan");
572MODULE_DESCRIPTION("PCI driver module for Promise PDC20268 and higher"); 588MODULE_DESCRIPTION("PCI driver module for Promise PDC20268 and higher");