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/scc_pata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/ide/pci/scc_pata.c') diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 62fa31409a33..0eced0ae2e86 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c @@ -291,7 +291,7 @@ static void scc_set_dma_mode(ide_drive_t *drive, const u8 speed) static void scc_dma_host_set(ide_drive_t *drive, int on) { ide_hwif_t *hwif = drive->hwif; - u8 unit = (drive->select.b.unit & 0x01); + u8 unit = drive->dn & 1; u8 dma_stat = scc_ide_inb(hwif->dma_base + 4); if (on) -- cgit v1.2.3