diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 22:53:26 +0200 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-07-24 22:53:26 +0200 |
commit | ea881d6d6c58aa6d56105d1faba7432243ea7118 (patch) | |
tree | bcdbc5ced995d15825a03b0a577ed0552c554d7c | |
parent | 64b0fed31d6704e4e2e42e9a1ac5995b0a1b54e4 (diff) | |
download | kernel_samsung_espresso10-ea881d6d6c58aa6d56105d1faba7432243ea7118.zip kernel_samsung_espresso10-ea881d6d6c58aa6d56105d1faba7432243ea7118.tar.gz kernel_samsung_espresso10-ea881d6d6c58aa6d56105d1faba7432243ea7118.tar.bz2 |
tc86c001: add ->remove method and module_exit()
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r-- | drivers/ide/pci/tc86c001.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index bb32921..102cd7c 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c @@ -232,6 +232,13 @@ out: return rc; } +static void __devexit tc86c001_remove(struct pci_dev *dev) +{ + ide_pci_remove(dev); + pci_release_region(dev, 5); + pci_disable_device(dev); +} + static const struct pci_device_id tc86c001_pci_tbl[] = { { PCI_VDEVICE(TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE), 0 }, { 0, } @@ -241,14 +248,22 @@ MODULE_DEVICE_TABLE(pci, tc86c001_pci_tbl); static struct pci_driver driver = { .name = "TC86C001", .id_table = tc86c001_pci_tbl, - .probe = tc86c001_init_one + .probe = tc86c001_init_one, + .remove = tc86c001_remove, }; static int __init tc86c001_ide_init(void) { return ide_pci_register_driver(&driver); } + +static void __exit tc86c001_ide_exit(void) +{ + pci_unregister_driver(&driver); +} + module_init(tc86c001_ide_init); +module_exit(tc86c001_ide_exit); MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); MODULE_DESCRIPTION("PCI driver module for TC86C001 IDE"); |