aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-probe.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:57 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-12-12 17:31:57 -0500
commitad0e74d3851e440e0882424577bc984c89019f52 (patch)
tree830c53d8d7b5568f2a6d2d21698295ca8c7ce95b /drivers/ide/ide-probe.c
parent69ae6fee4f95c0535e49e338ce0ed3b27fd485b5 (diff)
ide: add missing checks for control register existence
Add missing checks for control register existence (some legacy m68k specific IDE controllers don't have it). Also use drive->ctl while at it. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-probe.c')
-rw-r--r--drivers/ide/ide-probe.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index ee848c705995..bd0a6004a13b 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -667,7 +667,8 @@ static int wait_hwif_ready(ide_hwif_t *hwif)
667 /* Ignore disks that we will not probe for later. */ 667 /* Ignore disks that we will not probe for later. */
668 if (!drive->noprobe || drive->present) { 668 if (!drive->noprobe || drive->present) {
669 SELECT_DRIVE(drive); 669 SELECT_DRIVE(drive);
670 hwif->OUTB(8, hwif->io_ports[IDE_CONTROL_OFFSET]); 670 if (IDE_CONTROL_REG)
671 hwif->OUTB(drive->ctl, IDE_CONTROL_REG);
671 mdelay(2); 672 mdelay(2);
672 rc = ide_wait_not_busy(hwif, 35000); 673 rc = ide_wait_not_busy(hwif, 35000);
673 if (rc) 674 if (rc)