aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/amd74xx.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-11 03:43:52 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-11 03:43:52 +0100
commit99cd7074891f87c49660e3b2880564324a4733ac (patch)
tree903d2665bcb445f1f265d1adf7a99f265bcefc15 /drivers/ide/amd74xx.c
parenttrace: clean up funny line breaks in stat_seq_show (diff)
parentLinux 2.6.29-rc1 (diff)
downloadlinux-dev-99cd7074891f87c49660e3b2880564324a4733ac.tar.xz
linux-dev-99cd7074891f87c49660e3b2880564324a4733ac.zip
Merge commit 'v2.6.29-rc1' into tracing/urgent
Diffstat (limited to 'drivers/ide/amd74xx.c')
-rw-r--r--drivers/ide/amd74xx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/amd74xx.c b/drivers/ide/amd74xx.c
index c6bcd3014a29..69660a431cd9 100644
--- a/drivers/ide/amd74xx.c
+++ b/drivers/ide/amd74xx.c
@@ -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;
@@ -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);
}