diff options
Diffstat (limited to 'drivers/ide/pci/triflex.c')
-rw-r--r-- | drivers/ide/pci/triflex.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ide/pci/triflex.c b/drivers/ide/pci/triflex.c index db65a558d4ec..b77ec35151b3 100644 --- a/drivers/ide/pci/triflex.c +++ b/drivers/ide/pci/triflex.c | |||
@@ -33,6 +33,8 @@ | |||
33 | #include <linux/ide.h> | 33 | #include <linux/ide.h> |
34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
35 | 35 | ||
36 | #define DRV_NAME "triflex" | ||
37 | |||
36 | static void triflex_set_mode(ide_drive_t *drive, const u8 speed) | 38 | static void triflex_set_mode(ide_drive_t *drive, const u8 speed) |
37 | { | 39 | { |
38 | ide_hwif_t *hwif = HWIF(drive); | 40 | ide_hwif_t *hwif = HWIF(drive); |
@@ -93,7 +95,7 @@ static const struct ide_port_ops triflex_port_ops = { | |||
93 | }; | 95 | }; |
94 | 96 | ||
95 | static const struct ide_port_info triflex_device __devinitdata = { | 97 | static const struct ide_port_info triflex_device __devinitdata = { |
96 | .name = "TRIFLEX", | 98 | .name = DRV_NAME, |
97 | .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, | 99 | .enablebits = {{0x80, 0x01, 0x01}, {0x80, 0x02, 0x02}}, |
98 | .port_ops = &triflex_port_ops, | 100 | .port_ops = &triflex_port_ops, |
99 | .pio_mask = ATA_PIO4, | 101 | .pio_mask = ATA_PIO4, |
@@ -104,7 +106,7 @@ static const struct ide_port_info triflex_device __devinitdata = { | |||
104 | static int __devinit triflex_init_one(struct pci_dev *dev, | 106 | static int __devinit triflex_init_one(struct pci_dev *dev, |
105 | const struct pci_device_id *id) | 107 | const struct pci_device_id *id) |
106 | { | 108 | { |
107 | return ide_setup_pci_device(dev, &triflex_device); | 109 | return ide_pci_init_one(dev, &triflex_device, NULL); |
108 | } | 110 | } |
109 | 111 | ||
110 | static const struct pci_device_id triflex_pci_tbl[] = { | 112 | static const struct pci_device_id triflex_pci_tbl[] = { |
@@ -117,6 +119,7 @@ static struct pci_driver driver = { | |||
117 | .name = "TRIFLEX_IDE", | 119 | .name = "TRIFLEX_IDE", |
118 | .id_table = triflex_pci_tbl, | 120 | .id_table = triflex_pci_tbl, |
119 | .probe = triflex_init_one, | 121 | .probe = triflex_init_one, |
122 | .remove = ide_pci_remove, | ||
120 | }; | 123 | }; |
121 | 124 | ||
122 | static int __init triflex_ide_init(void) | 125 | static int __init triflex_ide_init(void) |
@@ -124,7 +127,13 @@ static int __init triflex_ide_init(void) | |||
124 | return ide_pci_register_driver(&driver); | 127 | return ide_pci_register_driver(&driver); |
125 | } | 128 | } |
126 | 129 | ||
130 | static void __exit triflex_ide_exit(void) | ||
131 | { | ||
132 | pci_unregister_driver(&driver); | ||
133 | } | ||
134 | |||
127 | module_init(triflex_ide_init); | 135 | module_init(triflex_ide_init); |
136 | module_exit(triflex_ide_exit); | ||
128 | 137 | ||
129 | MODULE_AUTHOR("Torben Mathiasen"); | 138 | MODULE_AUTHOR("Torben Mathiasen"); |
130 | MODULE_DESCRIPTION("PCI driver module for Compaq Triflex IDE"); | 139 | MODULE_DESCRIPTION("PCI driver module for Compaq Triflex IDE"); |