summaryrefslogtreecommitdiffstats
path: root/drivers/ide/cmd640.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-01-17 12:01:12 +0100
committerTakashi Iwai <tiwai@suse.de>2009-01-17 12:01:12 +0100
commitd1a020050c6ce1a0794ff73582ccf47e4db536f7 (patch)
tree1b7250410f24703cd77c76156e758db9887137aa /drivers/ide/cmd640.c
parentdc61b66fc724f89d357c43e2319d2cb7bec1e517 (diff)
parent641b4879444c0edb276fedca5c2fcbd2e5c70044 (diff)
Merge branch 'topic/usb-mixer-cache' into next/usb-audio
Diffstat (limited to 'drivers/ide/cmd640.c')
-rw-r--r--drivers/ide/cmd640.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/cmd640.c b/drivers/ide/cmd640.c
index e4306647d00..8890276fef7 100644
--- a/drivers/ide/cmd640.c
+++ b/drivers/ide/cmd640.c
@@ -467,11 +467,10 @@ static void program_drive_counts(ide_drive_t *drive, unsigned int index)
* so we merge the timings, using the slowest value for each timing.
*/
if (index > 1) {
- ide_hwif_t *hwif = drive->hwif;
- ide_drive_t *peer = &hwif->drives[!(drive->dn & 1)];
+ ide_drive_t *peer = ide_get_pair_dev(drive);
unsigned int mate = index ^ 1;
- if (peer->dev_flags & IDE_DFLAG_PRESENT) {
+ if (peer) {
if (setup_count < setup_counts[mate])
setup_count = setup_counts[mate];
if (active_count < active_counts[mate])