aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ali14xx.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:40 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-10-13 15:39:40 -0400
commit123995b97136cb41fa282f0ed2385f2c8066df96 (patch)
tree39b994f29bac4dc931be9abdde1e7f5412692856 /drivers/ide/legacy/ali14xx.c
parent8595259ccb6a13b9aab31832ce874d157064d256 (diff)
ide: use 'drive->dn & 1' instead of drive->select.b.unit
* Call ide_port_init_devices() in ide_host_register() also if 'struct ide_port_info *d' is not available. * Init drive->dn in ide_port_init_devices() instead of ide_probe_port() so it is valid also in ->init_dev. * Pass device number to ide_dev_apply_params(). * Use 'drive->dn & 1' instead of drive->select.b.unit. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/legacy/ali14xx.c')
-rw-r--r--drivers/ide/legacy/ali14xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/legacy/ali14xx.c b/drivers/ide/legacy/ali14xx.c
index 7276c96aaa2a..90da1f953ed0 100644
--- a/drivers/ide/legacy/ali14xx.c
+++ b/drivers/ide/legacy/ali14xx.c
@@ -131,7 +131,7 @@ static void ali14xx_set_pio_mode(ide_drive_t *drive, const u8 pio)
131 drive->name, pio, time1, time2, param1, param2, param3, param4); 131 drive->name, pio, time1, time2, param1, param2, param3, param4);
132 132
133 /* stuff timing parameters into controller registers */ 133 /* stuff timing parameters into controller registers */
134 driveNum = (HWIF(drive)->index << 1) + drive->select.b.unit; 134 driveNum = (drive->hwif->index << 1) + (drive->dn & 1);
135 spin_lock_irqsave(&ali14xx_lock, flags); 135 spin_lock_irqsave(&ali14xx_lock, flags);
136 outb_p(regOn, basePort); 136 outb_p(regOn, basePort);
137 outReg(param1, regTab[driveNum].reg1); 137 outReg(param1, regTab[driveNum].reg1);