aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/umc8672.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/umc8672.c')
-rw-r--r--drivers/ide/umc8672.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/ide/umc8672.c b/drivers/ide/umc8672.c
index e29978cf6197..0608d41fb6d0 100644
--- a/drivers/ide/umc8672.c
+++ b/drivers/ide/umc8672.c
@@ -106,22 +106,21 @@ static void umc_set_speeds(u8 speeds[])
106 106
107static void umc_set_pio_mode(ide_drive_t *drive, const u8 pio) 107static void umc_set_pio_mode(ide_drive_t *drive, const u8 pio)
108{ 108{
109 ide_hwif_t *hwif = drive->hwif; 109 ide_hwif_t *hwif = drive->hwif, *mate = hwif->mate;
110 ide_hwgroup_t *mate_hwgroup = hwif->mate ? hwif->mate->hwgroup : NULL;
111 unsigned long uninitialized_var(flags); 110 unsigned long uninitialized_var(flags);
112 111
113 printk("%s: setting umc8672 to PIO mode%d (speed %d)\n", 112 printk("%s: setting umc8672 to PIO mode%d (speed %d)\n",
114 drive->name, pio, pio_to_umc[pio]); 113 drive->name, pio, pio_to_umc[pio]);
115 if (mate_hwgroup) 114 if (mate)
116 spin_lock_irqsave(&mate_hwgroup->lock, flags); 115 spin_lock_irqsave(&mate->lock, flags);
117 if (mate_hwgroup && mate_hwgroup->handler) { 116 if (mate && mate->handler) {
118 printk(KERN_ERR "umc8672: other interface is busy: exiting tune_umc()\n"); 117 printk(KERN_ERR "umc8672: other interface is busy: exiting tune_umc()\n");
119 } else { 118 } else {
120 current_speeds[drive->name[2] - 'a'] = pio_to_umc[pio]; 119 current_speeds[drive->name[2] - 'a'] = pio_to_umc[pio];
121 umc_set_speeds(current_speeds); 120 umc_set_speeds(current_speeds);
122 } 121 }
123 if (mate_hwgroup) 122 if (mate)
124 spin_unlock_irqrestore(&mate_hwgroup->lock, flags); 123 spin_unlock_irqrestore(&mate->lock, flags);
125} 124}
126 125
127static const struct ide_port_ops umc8672_port_ops = { 126static const struct ide_port_ops umc8672_port_ops = {