]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/cs5520.c
ide: make void and rename ide_dma_timeout() method
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / cs5520.c
index ea3c52cc8ac1cf5c55aad7d31267d6f5d2142a00..3b88a3a561167c3986b8a0815c1b3161fec8ba7f 100644 (file)
@@ -32,7 +32,6 @@
  *
  */
  
-#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -133,12 +132,11 @@ static void cs5520_tune_drive(ide_drive_t *drive, u8 pio)
 
 static int cs5520_config_drive_xfer_rate(ide_drive_t *drive)
 {
-       ide_hwif_t *hwif = HWIF(drive);
-
        /* Tune the drive for PIO modes up to PIO 4 */  
        cs5520_tune_drive(drive, 4);
+
        /* Then tell the core to use DMA operations */
-       return hwif->ide_dma_on(drive);
+       return 0;
 }
 
 /*
@@ -215,6 +213,7 @@ static ide_pci_device_t cyrix_chipsets[] __devinitdata = {
  
 static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
+       ide_hwif_t *hwif = NULL, *mate = NULL;
        ata_index_t index;
        ide_pci_device_t *d = &cyrix_chipsets[id->driver_data];
 
@@ -241,10 +240,21 @@ static int __devinit cs5520_init_one(struct pci_dev *dev, const struct pci_devic
 
        ide_pci_setup_ports(dev, d, 14, &index);
 
-       if((index.b.low & 0xf0) != 0xf0)
-               probe_hwif_init(&ide_hwifs[index.b.low]);
-       if((index.b.high & 0xf0) != 0xf0)
-               probe_hwif_init(&ide_hwifs[index.b.high]);
+       if ((index.b.low & 0xf0) != 0xf0)
+               hwif = &ide_hwifs[index.b.low];
+       if ((index.b.high & 0xf0) != 0xf0)
+               mate = &ide_hwifs[index.b.high];
+
+       if (hwif)
+               probe_hwif_init(hwif);
+       if (mate)
+               probe_hwif_init(mate);
+
+       if (hwif)
+               ide_proc_register_port(hwif);
+       if (mate)
+               ide_proc_register_port(mate);
+
        return 0;
 }
 
@@ -261,7 +271,7 @@ static struct pci_driver driver = {
        .probe          = cs5520_init_one,
 };
 
-static int cs5520_ide_init(void)
+static int __init cs5520_ide_init(void)
 {
        return ide_pci_register_driver(&driver);
 }