aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/pdc202xx_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/pci/pdc202xx_new.c')
-rw-r--r--drivers/ide/pci/pdc202xx_new.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c
index bb29db03540e..b552960dc1c1 100644
--- a/drivers/ide/pci/pdc202xx_new.c
+++ b/drivers/ide/pci/pdc202xx_new.c
@@ -197,7 +197,7 @@ static void pdcnew_set_pio_mode(ide_drive_t *drive, const u8 pio)
197 } 197 }
198} 198}
199 199
200static u8 pdcnew_cable_detect(ide_hwif_t *hwif) 200static u8 __devinit pdcnew_cable_detect(ide_hwif_t *hwif)
201{ 201{
202 if (get_indexed_reg(hwif, 0x0b) & 0x04) 202 if (get_indexed_reg(hwif, 0x0b) & 0x04)
203 return ATA_CBL_PATA40; 203 return ATA_CBL_PATA40;
@@ -456,11 +456,7 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif)
456 hwif->quirkproc = &pdcnew_quirkproc; 456 hwif->quirkproc = &pdcnew_quirkproc;
457 hwif->resetproc = &pdcnew_reset; 457 hwif->resetproc = &pdcnew_reset;
458 458
459 if (hwif->dma_base == 0) 459 hwif->cable_detect = pdcnew_cable_detect;
460 return;
461
462 if (hwif->cbl != ATA_CBL_PATA40_SHORT)
463 hwif->cbl = pdcnew_cable_detect(hwif);
464} 460}
465 461
466static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev) 462static struct pci_dev * __devinit pdc20270_get_dev2(struct pci_dev *dev)