aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/alim15x3.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/alim15x3.c')
-rw-r--r--drivers/ide/pci/alim15x3.c18
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c
index 5ef7817ac64f..b582687e0cd4 100644
--- a/drivers/ide/pci/alim15x3.c
+++ b/drivers/ide/pci/alim15x3.c
@@ -38,6 +38,8 @@
38 38
39#include <asm/io.h> 39#include <asm/io.h>
40 40
41#define DRV_NAME "alim15x3"
42
41/* 43/*
42 * Allow UDMA on M1543C-E chipset for WDC disks that ignore CRC checking 44 * Allow UDMA on M1543C-E chipset for WDC disks that ignore CRC checking
43 * (this is DANGEROUS and could result in data corruption). 45 * (this is DANGEROUS and could result in data corruption).
@@ -207,13 +209,12 @@ static int ali15x3_dma_setup(ide_drive_t *drive)
207/** 209/**
208 * init_chipset_ali15x3 - Initialise an ALi IDE controller 210 * init_chipset_ali15x3 - Initialise an ALi IDE controller
209 * @dev: PCI device 211 * @dev: PCI device
210 * @name: Name of the controller
211 * 212 *
212 * This function initializes the ALI IDE controller and where 213 * This function initializes the ALI IDE controller and where
213 * appropriate also sets up the 1533 southbridge. 214 * appropriate also sets up the 1533 southbridge.
214 */ 215 */
215 216
216static unsigned int __devinit init_chipset_ali15x3 (struct pci_dev *dev, const char *name) 217static unsigned int __devinit init_chipset_ali15x3(struct pci_dev *dev)
217{ 218{
218 unsigned long flags; 219 unsigned long flags;
219 u8 tmpbyte; 220 u8 tmpbyte;
@@ -515,7 +516,7 @@ static const struct ide_dma_ops ali_dma_ops = {
515}; 516};
516 517
517static const struct ide_port_info ali15x3_chipset __devinitdata = { 518static const struct ide_port_info ali15x3_chipset __devinitdata = {
518 .name = "ALI15X3", 519 .name = DRV_NAME,
519 .init_chipset = init_chipset_ali15x3, 520 .init_chipset = init_chipset_ali15x3,
520 .init_hwif = init_hwif_ali15x3, 521 .init_hwif = init_hwif_ali15x3,
521 .init_dma = init_dma_ali15x3, 522 .init_dma = init_dma_ali15x3,
@@ -565,7 +566,7 @@ static int __devinit alim15x3_init_one(struct pci_dev *dev, const struct pci_dev
565 if (idx == 0) 566 if (idx == 0)
566 d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX; 567 d.host_flags |= IDE_HFLAG_CLEAR_SIMPLEX;
567 568
568 return ide_setup_pci_device(dev, &d); 569 return ide_pci_init_one(dev, &d, NULL);
569} 570}
570 571
571 572
@@ -580,6 +581,7 @@ static struct pci_driver driver = {
580 .name = "ALI15x3_IDE", 581 .name = "ALI15x3_IDE",
581 .id_table = alim15x3_pci_tbl, 582 .id_table = alim15x3_pci_tbl,
582 .probe = alim15x3_init_one, 583 .probe = alim15x3_init_one,
584 .remove = ide_pci_remove,
583}; 585};
584 586
585static int __init ali15x3_ide_init(void) 587static int __init ali15x3_ide_init(void)
@@ -587,7 +589,13 @@ static int __init ali15x3_ide_init(void)
587 return ide_pci_register_driver(&driver); 589 return ide_pci_register_driver(&driver);
588} 590}
589 591
592static void __exit ali15x3_ide_exit(void)
593{
594 return pci_unregister_driver(&driver);
595}
596
590module_init(ali15x3_ide_init); 597module_init(ali15x3_ide_init);
598module_exit(ali15x3_ide_exit);
591 599
592MODULE_AUTHOR("Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox"); 600MODULE_AUTHOR("Michael Aubry, Andrzej Krzysztofowicz, CJ, Andre Hedrick, Alan Cox");
593MODULE_DESCRIPTION("PCI driver module for ALi 15x3 IDE"); 601MODULE_DESCRIPTION("PCI driver module for ALi 15x3 IDE");