diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:40 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-10-13 15:39:40 -0400 |
commit | 123995b97136cb41fa282f0ed2385f2c8066df96 (patch) | |
tree | 39b994f29bac4dc931be9abdde1e7f5412692856 /drivers/ide/ide-dma.c | |
parent | 8595259ccb6a13b9aab31832ce874d157064d256 (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/ide-dma.c')
-rw-r--r-- | drivers/ide/ide-dma.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 82fa6107434b..d5934fc8f85f 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -370,7 +370,7 @@ static int dma_timer_expiry (ide_drive_t *drive) | |||
370 | void ide_dma_host_set(ide_drive_t *drive, int on) | 370 | void ide_dma_host_set(ide_drive_t *drive, int on) |
371 | { | 371 | { |
372 | ide_hwif_t *hwif = HWIF(drive); | 372 | ide_hwif_t *hwif = HWIF(drive); |
373 | u8 unit = (drive->select.b.unit & 0x01); | 373 | u8 unit = drive->dn & 1; |
374 | u8 dma_stat = hwif->tp_ops->read_sff_dma_status(hwif); | 374 | u8 dma_stat = hwif->tp_ops->read_sff_dma_status(hwif); |
375 | 375 | ||
376 | if (on) | 376 | if (on) |