aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/trm290.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/trm290.c')
-rw-r--r--drivers/ide/pci/trm290.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c
index a8a3138682ef..fd28b49977fd 100644
--- a/drivers/ide/pci/trm290.c
+++ b/drivers/ide/pci/trm290.c
@@ -141,6 +141,8 @@
141 141
142#include <asm/io.h> 142#include <asm/io.h>
143 143
144#define DRV_NAME "trm290"
145
144static void trm290_prepare_drive (ide_drive_t *drive, unsigned int use_dma) 146static void trm290_prepare_drive (ide_drive_t *drive, unsigned int use_dma)
145{ 147{
146 ide_hwif_t *hwif = HWIF(drive); 148 ide_hwif_t *hwif = HWIF(drive);
@@ -245,10 +247,10 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
245 u8 reg = 0; 247 u8 reg = 0;
246 248
247 if ((dev->class & 5) && cfg_base) 249 if ((dev->class & 5) && cfg_base)
248 printk(KERN_INFO "TRM290: chip"); 250 printk(KERN_INFO DRV_NAME " %s: chip", pci_name(dev));
249 else { 251 else {
250 cfg_base = 0x3df0; 252 cfg_base = 0x3df0;
251 printk(KERN_INFO "TRM290: using default"); 253 printk(KERN_INFO DRV_NAME " %s: using default", pci_name(dev));
252 } 254 }
253 printk(KERN_CONT " config base at 0x%04x\n", cfg_base); 255 printk(KERN_CONT " config base at 0x%04x\n", cfg_base);
254 hwif->config_data = cfg_base; 256 hwif->config_data = cfg_base;
@@ -325,7 +327,7 @@ static struct ide_dma_ops trm290_dma_ops = {
325}; 327};
326 328
327static const struct ide_port_info trm290_chipset __devinitdata = { 329static const struct ide_port_info trm290_chipset __devinitdata = {
328 .name = "TRM290", 330 .name = DRV_NAME,
329 .init_hwif = init_hwif_trm290, 331 .init_hwif = init_hwif_trm290,
330 .chipset = ide_trm290, 332 .chipset = ide_trm290,
331 .port_ops = &trm290_port_ops, 333 .port_ops = &trm290_port_ops,
@@ -340,7 +342,7 @@ static const struct ide_port_info trm290_chipset __devinitdata = {
340 342
341static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id) 343static int __devinit trm290_init_one(struct pci_dev *dev, const struct pci_device_id *id)
342{ 344{
343 return ide_setup_pci_device(dev, &trm290_chipset); 345 return ide_pci_init_one(dev, &trm290_chipset, NULL);
344} 346}
345 347
346static const struct pci_device_id trm290_pci_tbl[] = { 348static const struct pci_device_id trm290_pci_tbl[] = {
@@ -353,6 +355,7 @@ static struct pci_driver driver = {
353 .name = "TRM290_IDE", 355 .name = "TRM290_IDE",
354 .id_table = trm290_pci_tbl, 356 .id_table = trm290_pci_tbl,
355 .probe = trm290_init_one, 357 .probe = trm290_init_one,
358 .remove = ide_pci_remove,
356}; 359};
357 360
358static int __init trm290_ide_init(void) 361static int __init trm290_ide_init(void)
@@ -360,7 +363,13 @@ static int __init trm290_ide_init(void)
360 return ide_pci_register_driver(&driver); 363 return ide_pci_register_driver(&driver);
361} 364}
362 365
366static void __exit trm290_ide_exit(void)
367{
368 pci_unregister_driver(&driver);
369}
370
363module_init(trm290_ide_init); 371module_init(trm290_ide_init);
372module_exit(trm290_ide_exit);
364 373
365MODULE_AUTHOR("Mark Lord"); 374MODULE_AUTHOR("Mark Lord");
366MODULE_DESCRIPTION("PCI driver module for Tekram TRM290 IDE"); 375MODULE_DESCRIPTION("PCI driver module for Tekram TRM290 IDE");