]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/pci/jmicron.c
[Blackfin] serial driver: Fix bug Poll RTS/CTS status in DMA mode as well
[linux-2.6-omap-h63xx.git] / drivers / ide / pci / jmicron.c
index 2eeff670d9a624f53c47d77da0acf91b3684e98c..a56bcb4f22f4f9d402616d5314c50a4ed8794ec5 100644 (file)
@@ -8,13 +8,10 @@
 #include <linux/types.h>
 #include <linux/module.h>
 #include <linux/pci.h>
-#include <linux/delay.h>
 #include <linux/hdreg.h>
 #include <linux/ide.h>
 #include <linux/init.h>
 
-#include <asm/io.h>
-
 typedef enum {
        PORT_PATA0 = 0,
        PORT_PATA1 = 1,
@@ -30,7 +27,7 @@ typedef enum {
 
 static u8 __devinit ata66_jmicron(ide_hwif_t *hwif)
 {
-       struct pci_dev *pdev = hwif->pci_dev;
+       struct pci_dev *pdev = to_pci_dev(hwif->dev);
 
        u32 control;
        u32 control5;
@@ -111,14 +108,10 @@ static void __devinit init_hwif_jmicron(ide_hwif_t *hwif)
        hwif->set_pio_mode = &jmicron_set_pio_mode;
        hwif->set_dma_mode = &jmicron_set_dma_mode;
 
-       if (hwif->dma_base == 0)
-               return;
-
-       if (hwif->cbl != ATA_CBL_PATA40_SHORT)
-               hwif->cbl = ata66_jmicron(hwif);
+       hwif->cable_detect = ata66_jmicron;
 }
 
-static ide_pci_device_t jmicron_chipset __devinitdata = {
+static const struct ide_port_info jmicron_chipset __devinitdata = {
        .name           = "JMB",
        .init_hwif      = init_hwif_jmicron,
        .host_flags     = IDE_HFLAG_BOOTABLE,
@@ -139,8 +132,7 @@ static ide_pci_device_t jmicron_chipset __devinitdata = {
 
 static int __devinit jmicron_init_one(struct pci_dev *dev, const struct pci_device_id *id)
 {
-       ide_setup_pci_device(dev, &jmicron_chipset);
-       return 0;
+       return ide_setup_pci_device(dev, &jmicron_chipset);
 }
 
 /* All JMB PATA controllers have and will continue to have the same