Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / drivers / ide / pci / opti621.c
index 3ca7db7..7a7c2ef 100644 (file)
 
 #include <asm/io.h>
 
-#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,7 +377,7 @@ 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,
 };