X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=drivers%2Fide%2Fpci%2Fcmd640.c;fp=drivers%2Fide%2Fpci%2Fcmd640.c;h=e4306647d00d6782e8db72d40d82827bb085044f;hp=d3afdffcb07a9fb177084b5ba0bfa16c0ccaaac9;hb=123995b97136cb41fa282f0ed2385f2c8066df96;hpb=8595259ccb6a13b9aab31832ce874d157064d256 diff --git a/drivers/ide/pci/cmd640.c b/drivers/ide/pci/cmd640.c index d3afdffcb07a..e4306647d00d 100644 --- a/drivers/ide/pci/cmd640.c +++ b/drivers/ide/pci/cmd640.c @@ -468,7 +468,7 @@ static void program_drive_counts(ide_drive_t *drive, unsigned int index) */ if (index > 1) { ide_hwif_t *hwif = drive->hwif; - ide_drive_t *peer = &hwif->drives[!drive->select.b.unit]; + ide_drive_t *peer = &hwif->drives[!(drive->dn & 1)]; unsigned int mate = index ^ 1; if (peer->dev_flags & IDE_DFLAG_PRESENT) { @@ -607,7 +607,7 @@ static void cmd640_set_pio_mode(ide_drive_t *drive, const u8 pio) static void cmd640_init_dev(ide_drive_t *drive) { - unsigned int i = drive->hwif->channel * 2 + drive->select.b.unit; + unsigned int i = drive->hwif->channel * 2 + (drive->dn & 1); #ifdef CONFIG_BLK_DEV_CMD640_ENHANCED /*