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 | ea881d6d6c58aa6d56105d1faba7432243ea7118 (patch) | |
tree | bcdbc5ced995d15825a03b0a577ed0552c554d7c /drivers/ide | |
parent | 64b0fed31d6704e4e2e42e9a1ac5995b0a1b54e4 (diff) |
tc86c001: add ->remove method and module_exit()
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide')
-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 bb3292199356..102cd7c40cdd 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -232,6 +232,13 @@ out: | |||
232 | return rc; | 232 | return rc; |
233 | } | 233 | } |
234 | 234 | ||
235 | static void __devexit tc86c001_remove(struct pci_dev *dev) | ||
236 | { | ||
237 | ide_pci_remove(dev); | ||
238 | pci_release_region(dev, 5); | ||
239 | pci_disable_device(dev); | ||
240 | } | ||
241 | |||
235 | static const struct pci_device_id tc86c001_pci_tbl[] = { | 242 | static const struct pci_device_id tc86c001_pci_tbl[] = { |
236 | { PCI_VDEVICE(TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE), 0 }, | 243 | { PCI_VDEVICE(TOSHIBA_2, PCI_DEVICE_ID_TOSHIBA_TC86C001_IDE), 0 }, |
237 | { 0, } | 244 | { 0, } |
@@ -241,14 +248,22 @@ MODULE_DEVICE_TABLE(pci, tc86c001_pci_tbl); | |||
241 | static struct pci_driver driver = { | 248 | static struct pci_driver driver = { |
242 | .name = "TC86C001", | 249 | .name = "TC86C001", |
243 | .id_table = tc86c001_pci_tbl, | 250 | .id_table = tc86c001_pci_tbl, |
244 | .probe = tc86c001_init_one | 251 | .probe = tc86c001_init_one, |
252 | .remove = tc86c001_remove, | ||
245 | }; | 253 | }; |
246 | 254 | ||
247 | static int __init tc86c001_ide_init(void) | 255 | static int __init tc86c001_ide_init(void) |
248 | { | 256 | { |
249 | return ide_pci_register_driver(&driver); | 257 | return ide_pci_register_driver(&driver); |
250 | } | 258 | } |
259 | |||
260 | static void __exit tc86c001_ide_exit(void) | ||
261 | { | ||
262 | pci_unregister_driver(&driver); | ||
263 | } | ||
264 | |||
251 | module_init(tc86c001_ide_init); | 265 | module_init(tc86c001_ide_init); |
266 | module_exit(tc86c001_ide_exit); | ||
252 | 267 | ||
253 | MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); | 268 | MODULE_AUTHOR("MontaVista Software, Inc. <source@mvista.com>"); |
254 | MODULE_DESCRIPTION("PCI driver module for TC86C001 IDE"); | 269 | MODULE_DESCRIPTION("PCI driver module for TC86C001 IDE"); |