diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 16:53:26 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 16:53:26 -0400 |
commit | 585f67e736eece4cdf96b628042170273221e770 (patch) | |
tree | b357f2325d20fe4c93adfd4ddc71005192443d70 /drivers/ide/pci | |
parent | fc2c32b737fa370683f8c44d74f41febe33b9c23 (diff) |
via82cxxx: add ->remove method and module_exit()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci')
-rw-r--r-- | drivers/ide/pci/via82cxxx.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index bc1675da37d1..5f07eeb736ab 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -467,6 +467,15 @@ static int __devinit via_init_one(struct pci_dev *dev, const struct pci_device_i | |||
467 | return rc; | 467 | return rc; |
468 | } | 468 | } |
469 | 469 | ||
470 | static void __devexit via_remove(struct pci_dev *dev) | ||
471 | { | ||
472 | struct ide_host *host = pci_get_drvdata(dev); | ||
473 | struct via82cxxx_dev *vdev = host->host_priv; | ||
474 | |||
475 | ide_pci_remove(dev); | ||
476 | kfree(vdev); | ||
477 | } | ||
478 | |||
470 | static const struct pci_device_id via_pci_tbl[] = { | 479 | static const struct pci_device_id via_pci_tbl[] = { |
471 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, | 480 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), 0 }, |
472 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, | 481 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), 0 }, |
@@ -481,6 +490,7 @@ static struct pci_driver driver = { | |||
481 | .name = "VIA_IDE", | 490 | .name = "VIA_IDE", |
482 | .id_table = via_pci_tbl, | 491 | .id_table = via_pci_tbl, |
483 | .probe = via_init_one, | 492 | .probe = via_init_one, |
493 | .remove = via_remove, | ||
484 | }; | 494 | }; |
485 | 495 | ||
486 | static int __init via_ide_init(void) | 496 | static int __init via_ide_init(void) |
@@ -488,7 +498,13 @@ static int __init via_ide_init(void) | |||
488 | return ide_pci_register_driver(&driver); | 498 | return ide_pci_register_driver(&driver); |
489 | } | 499 | } |
490 | 500 | ||
501 | static void __exit via_ide_exit(void) | ||
502 | { | ||
503 | pci_unregister_driver(&driver); | ||
504 | } | ||
505 | |||
491 | module_init(via_ide_init); | 506 | module_init(via_ide_init); |
507 | module_exit(via_ide_exit); | ||
492 | 508 | ||
493 | MODULE_AUTHOR("Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick"); | 509 | MODULE_AUTHOR("Vojtech Pavlik, Michel Aubry, Jeff Garzik, Andre Hedrick"); |
494 | MODULE_DESCRIPTION("PCI driver module for VIA IDE"); | 510 | MODULE_DESCRIPTION("PCI driver module for VIA IDE"); |