[PATCH 6/9] umc8672: don't use ide_hwifs[] in umc_set_pio_mode()

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-ide@...>
Cc: Bartlomiej Zolnierkiewicz <bzolnier@...>, <linux-kernel@...>
Date: Saturday, February 16, 2008 - 4:27 pm

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
---
 drivers/ide/legacy/umc8672.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: b/drivers/ide/legacy/umc8672.c
===================================================================
--- 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];
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/9] sgiioc4: use ide_find_port(), Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:26 pm)
[PATCH 9/9] ide: IDE_HFLAG_BOOTABLE -&gt; IDE_HFLAG_NON_BOOTABLE, Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:27 pm)
[PATCH 8/9] qd65xx: return error value in qd_probe(), Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:27 pm)
Re: [PATCH 8/9] qd65xx: return error value in qd_probe(), Sergei Shtylyov, (Mon Feb 18, 1:00 pm)
[PATCH 7/9] ht6560b: use driver name for resource allocation, Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:27 pm)
[PATCH 6/9] umc8672: don't use ide_hwifs[] in umc_set_pio_mo..., Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:27 pm)
[PATCH 5/9] scc_pata: store 'hwif' pointer in struct scc_ports, Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:27 pm)
[PATCH 4/9] cmd640: use ide_find_port(), Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:26 pm)
[PATCH 3/9] cmd640: remove cmd_drives[], Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:26 pm)
[PATCH 2/9] au1xxx-ide: use ide_find_port(), Bartlomiej Zolnierkiewicz..., (Sat Feb 16, 4:26 pm)