From 123995b97136cb41fa282f0ed2385f2c8066df96 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Mon, 13 Oct 2008 21:39:40 +0200 Subject: 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 --- drivers/ide/pci/opti621.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/ide/pci/opti621.c') diff --git a/drivers/ide/pci/opti621.c b/drivers/ide/pci/opti621.c index 3de11ddcf863..f0db38bd70e3 100644 --- a/drivers/ide/pci/opti621.c +++ b/drivers/ide/pci/opti621.c @@ -179,7 +179,7 @@ static void opti621_set_pio_mode(ide_drive_t *drive, const u8 pio) misc = addr_timings[clk][addr_pio]; /* select Index-0/1 for Register-A/B */ - write_reg(drive->select.b.unit, MISC_REG); + write_reg(drive->dn & 1, MISC_REG); /* set read cycle timings */ write_reg(tim, READ_REG); /* set write cycle timings */ -- cgit v1.2.3