X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fide%2Fpci%2Fopti621.c;h=22bbf613f94802ef74811b7907216a487d60f843;hb=97bf2856c6014879bd04983a3e9dfcdac1e7fe85;hp=3ca7db7d5bdfbd133033eb18294f27671fdc5cdf;hpb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;p=linux-2.6.git diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index 3ca7db7d5..22bbf613f 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c @@ -104,8 +104,6 @@ #include -#include "opti621.h" - #define OPTI621_MAX_PIO 3 /* In fact, I do not have any PIO 4 drive * (address: 25 ns, data: 70 ns, recovery: 35 ns), @@ -328,7 +326,7 @@ static void opti621_tune_drive (ide_drive_t *drive, u8 pio) /* * init_hwif_opti621() is called once for each hwif found at boot. */ -static void __init init_hwif_opti621 (ide_hwif_t *hwif) +static void __devinit init_hwif_opti621 (ide_hwif_t *hwif) { hwif->autodma = 0; hwif->drives[0].drive_data = PIO_DONT_KNOW; @@ -348,15 +346,27 @@ static void __init init_hwif_opti621 (ide_hwif_t *hwif) hwif->drives[1].autodma = hwif->autodma; } -static void __init init_setup_opti621 (struct pci_dev *dev, ide_pci_device_t *d) -{ - ide_setup_pci_device(dev, d); -} +static ide_pci_device_t opti621_chipsets[] __devinitdata = { + { /* 0 */ + .name = "OPTI621", + .init_hwif = init_hwif_opti621, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, + .bootable = ON_BOARD, + },{ /* 1 */ + .name = "OPTI621X", + .init_hwif = init_hwif_opti621, + .channels = 2, + .autodma = AUTODMA, + .enablebits = {{0x45,0x80,0x00}, {0x40,0x08,0x00}}, + .bootable = ON_BOARD, + } +}; static int __devinit opti621_init_one(struct pci_dev *dev, const struct pci_device_id *id) { - ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]); - return 0; + return ide_setup_pci_device(dev, &opti621_chipsets[id->driver_data]); } static struct pci_device_id opti621_pci_tbl[] = { @@ -367,12 +377,12 @@ static struct pci_device_id opti621_pci_tbl[] = { MODULE_DEVICE_TABLE(pci, opti621_pci_tbl); static struct pci_driver driver = { - .name = "Opti621 IDE", + .name = "Opti621_IDE", .id_table = opti621_pci_tbl, .probe = opti621_init_one, }; -static int opti621_ide_init(void) +static int __init opti621_ide_init(void) { return ide_pci_register_driver(&driver); }