Skip to content

Commit

Permalink
amd74xx: use ide_get_pair_dev() helper
Browse files Browse the repository at this point in the history
There should be no functional changes caused by this patch.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
  • Loading branch information
Bartlomiej Zolnierkiewicz committed Jan 6, 2009
1 parent 627e05d commit bca4ff1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/ide/amd74xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ static void amd_set_drive(ide_drive_t *drive, const u8 speed)
{
ide_hwif_t *hwif = drive->hwif;
struct pci_dev *dev = to_pci_dev(hwif->dev);
ide_drive_t *peer = hwif->drives + (~drive->dn & 1);
ide_drive_t *peer = ide_get_pair_dev(drive);
struct ide_timing t, p;
int T, UT;
u8 udma_mask = hwif->ultra_mask;
Expand All @@ -92,7 +92,7 @@ static void amd_set_drive(ide_drive_t *drive, const u8 speed)

ide_timing_compute(drive, speed, &t, T, UT);

if (peer->dev_flags & IDE_DFLAG_PRESENT) {
if (peer) {
ide_timing_compute(peer, peer->current_speed, &p, T, UT);
ide_timing_merge(&p, &t, &t, IDE_TIMING_8BIT);
}
Expand Down

0 comments on commit bca4ff1

Please sign in to comment.