aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-io.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-io.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-io.c')
-rw-r--r--drivers/ide/ide-io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ide/ide-io.c b/drivers/ide/ide-io.c
index db22d1ff4e55..bef781fec500 100644
--- a/drivers/ide/ide-io.c
+++ b/drivers/ide/ide-io.c
@@ -970,7 +970,8 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
970 if (rc) 970 if (rc)
971 printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name); 971 printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name);
972 SELECT_DRIVE(drive); 972 SELECT_DRIVE(drive);
973 HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]); 973 if (IDE_CONTROL_REG)
974 HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
974 rc = ide_wait_not_busy(HWIF(drive), 100000); 975 rc = ide_wait_not_busy(HWIF(drive), 100000);
975 if (rc) 976 if (rc)
976 printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name); 977 printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name);