]> err.no Git - linux-2.6/blobdiff - drivers/ide/pci/tc86c001.c
ide: ->cable_detect method cannot be marked __devinit
[linux-2.6] / drivers / ide / pci / tc86c001.c
index bb3292199356490b92dd21fb925845c53c9117d5..7fc88c375e5db4561ccc477a5f690c2437e14df3 100644 (file)
@@ -11,7 +11,7 @@
 #include <linux/pci.h>
 #include <linux/ide.h>
 
-#define DRV_NAME "TC86C001"
+#define DRV_NAME "tc86c001"
 
 static void tc86c001_set_mode(ide_drive_t *drive, const u8 speed)
 {
@@ -131,7 +131,7 @@ static void tc86c001_dma_start(ide_drive_t *drive)
        ide_dma_start(drive);
 }
 
-static u8 __devinit tc86c001_cable_detect(ide_hwif_t *hwif)
+static u8 tc86c001_cable_detect(ide_hwif_t *hwif)
 {
        struct pci_dev *dev = to_pci_dev(hwif->dev);
        unsigned long sc_base = pci_resource_start(dev, 5);
@@ -193,7 +193,7 @@ static const struct ide_dma_ops tc86c001_dma_ops = {
 };
 
 static const struct ide_port_info tc86c001_chipset __devinitdata = {
-       .name           = "TC86C001",
+       .name           = DRV_NAME,
        .init_hwif      = init_hwif_tc86c001,
        .port_ops       = &tc86c001_port_ops,
        .dma_ops        = &tc86c001_dma_ops,
@@ -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");