aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 17:36:34 +0200
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 17:36:34 +0200
commitd147e7d8f22c18cfb879513e8e1e10fa52f9789e (patch)
treecb02c1b4c21dc00856b825dbd1d482faf779fc48
parent589b06262021f8d52847c9389acf26e95c6b3732 (diff)
umc8672: don't use ide_hwifs[] in umc_set_pio_mode()
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
-rw-r--r--drivers/ide/legacy/umc8672.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/legacy/umc8672.c b/drivers/ide/legacy/umc8672.c
index bc1944811b9..ef768a84be9 100644
--- a/drivers/ide/legacy/umc8672.c
+++ b/drivers/ide/legacy/umc8672.c
@@ -105,13 +105,13 @@ static void umc_set_speeds (u8 speeds[])
static void umc_set_pio_mode(ide_drive_t *drive, const u8 pio)
{
+ ide_hwif_t *hwif = drive->hwif;
unsigned long flags;
- ide_hwgroup_t *hwgroup = ide_hwifs[HWIF(drive)->index^1].hwgroup;
printk("%s: setting umc8672 to PIO mode%d (speed %d)\n",
drive->name, pio, pio_to_umc[pio]);
spin_lock_irqsave(&ide_lock, flags);
- if (hwgroup && hwgroup->handler != NULL) {
+ if (hwif->mate && hwif->mate->hwgroup->handler) {
printk(KERN_ERR "umc8672: other interface is busy: exiting tune_umc()\n");
} else {
current_speeds[drive->name[2] - 'a'] = pio_to_umc[pio];