diff options
Diffstat (limited to 'drivers/ide/pci/opti621.c')
-rw-r--r-- | drivers/ide/pci/opti621.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index 725c80508d90..e28e672ddafc 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c | |||
@@ -90,6 +90,8 @@ | |||
90 | 90 | ||
91 | #include <asm/io.h> | 91 | #include <asm/io.h> |
92 | 92 | ||
93 | #define DRV_NAME "opti621" | ||
94 | |||
93 | #define READ_REG 0 /* index of Read cycle timing register */ | 95 | #define READ_REG 0 /* index of Read cycle timing register */ |
94 | #define WRITE_REG 1 /* index of Write cycle timing register */ | 96 | #define WRITE_REG 1 /* index of Write cycle timing register */ |
95 | #define CNTRL_REG 3 /* index of Control register */ | 97 | #define CNTRL_REG 3 /* index of Control register */ |
@@ -200,7 +202,7 @@ static const struct ide_port_ops opti621_port_ops = { | |||
200 | }; | 202 | }; |
201 | 203 | ||
202 | static const struct ide_port_info opti621_chipset __devinitdata = { | 204 | static const struct ide_port_info opti621_chipset __devinitdata = { |
203 | .name = "OPTI621/X", | 205 | .name = DRV_NAME, |
204 | .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, | 206 | .enablebits = { {0x45, 0x80, 0x00}, {0x40, 0x08, 0x00} }, |
205 | .port_ops = &opti621_port_ops, | 207 | .port_ops = &opti621_port_ops, |
206 | .host_flags = IDE_HFLAG_NO_DMA, | 208 | .host_flags = IDE_HFLAG_NO_DMA, |
@@ -209,7 +211,7 @@ static const struct ide_port_info opti621_chipset __devinitdata = { | |||
209 | 211 | ||
210 | static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) | 212 | static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) |
211 | { | 213 | { |
212 | return ide_setup_pci_device(dev, &opti621_chipset); | 214 | return ide_pci_init_one(dev, &opti621_chipset, NULL); |
213 | } | 215 | } |
214 | 216 | ||
215 | static const struct pci_device_id opti621_pci_tbl[] = { | 217 | static const struct pci_device_id opti621_pci_tbl[] = { |
@@ -223,6 +225,7 @@ static struct pci_driver driver = { | |||
223 | .name = "Opti621_IDE", | 225 | .name = "Opti621_IDE", |
224 | .id_table = opti621_pci_tbl, | 226 | .id_table = opti621_pci_tbl, |
225 | .probe = opti621_init_one, | 227 | .probe = opti621_init_one, |
228 | .remove = ide_pci_remove, | ||
226 | }; | 229 | }; |
227 | 230 | ||
228 | static int __init opti621_ide_init(void) | 231 | static int __init opti621_ide_init(void) |
@@ -230,7 +233,13 @@ static int __init opti621_ide_init(void) | |||
230 | return ide_pci_register_driver(&driver); | 233 | return ide_pci_register_driver(&driver); |
231 | } | 234 | } |
232 | 235 | ||
236 | static void __exit opti621_ide_exit(void) | ||
237 | { | ||
238 | pci_unregister_driver(&driver); | ||
239 | } | ||
240 | |||
233 | module_init(opti621_ide_init); | 241 | module_init(opti621_ide_init); |
242 | module_exit(opti621_ide_exit); | ||
234 | 243 | ||
235 | MODULE_AUTHOR("Jaromir Koutek, Jan Harkes, Mark Lord"); | 244 | MODULE_AUTHOR("Jaromir Koutek, Jan Harkes, Mark Lord"); |
236 | MODULE_DESCRIPTION("PCI driver module for Opti621 IDE"); | 245 | MODULE_DESCRIPTION("PCI driver module for Opti621 IDE"); |