]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/legacy/ali14xx.c
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-omap-h63xx.git] / drivers / ide / legacy / ali14xx.c
index 4ec19737f3c5356e88e00403714e0afa482bc3f4..90da1f953ed080d0b0fb3ce38ff527398c42d00c 100644 (file)
@@ -43,7 +43,6 @@
 #include <linux/mm.h>
 #include <linux/ioport.h>
 #include <linux/blkdev.h>
-#include <linux/hdreg.h>
 #include <linux/ide.h>
 #include <linux/init.h>
 
@@ -132,7 +131,7 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
                drive->name, pio, time1, time2, param1, param2, param3, param4);
 
        /* stuff timing parameters into controller registers */
-       driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit;
+       driveNum = (drive->hwif->index << 1) + (drive->dn & 1);
        spin_lock_irqsave(&ali14xx_lock, flags);
        outb_p(regOn, basePort);
        outReg(param1, regTab[driveNum].reg1);