]> Pileus Git - ~andy/linux/blobdiff - drivers/ide/ide-io.c
ide: add missing checks for control register existence
[~andy/linux] / drivers / ide / ide-io.c
index db22d1ff4e559ff1eb2652de98b23e5c6ae22267..bef781fec5006d694069c614e2bda90ebec2b277 100644 (file)
@@ -970,7 +970,8 @@ static void ide_check_pm_state(ide_drive_t *drive, struct request *rq)
                if (rc)
                        printk(KERN_WARNING "%s: bus not ready on wakeup\n", drive->name);
                SELECT_DRIVE(drive);
-               HWIF(drive)->OUTB(8, HWIF(drive)->io_ports[IDE_CONTROL_OFFSET]);
+               if (IDE_CONTROL_REG)
+                       HWIF(drive)->OUTB(drive->ctl, IDE_CONTROL_REG);
                rc = ide_wait_not_busy(HWIF(drive), 100000);
                if (rc)
                        printk(KERN_WARNING "%s: drive not ready on wakeup\n", drive->name);