aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/umc8672.c
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2008-12-31 07:35:57 -0500
committerRusty Russell <rusty@rustcorp.com.au>2008-12-31 07:35:57 -0500
commit2ca1a615835d9f4990f42102ab1f2ef434e7e89c (patch)
tree726cf3d5f29a6c66c44e4bd68e7ebed2fd83d059 /drivers/ide/umc8672.c
parente12f0102ac81d660c9f801d0a0e10ccf4537a9de (diff)
parent6a94cb73064c952255336cc57731904174b2c58f (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts: arch/x86/kernel/io_apic.c
Diffstat (limited to 'drivers/ide/umc8672.c')
-rw-r--r--drivers/ide/umc8672.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ide/umc8672.c b/drivers/ide/umc8672.c
index 1da076e0c917..e29978cf6197 100644
--- a/drivers/ide/umc8672.c
+++ b/drivers/ide/umc8672.c
@@ -107,18 +107,21 @@ static void umc_set_speeds(u8 speeds[])
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;
110 unsigned long flags; 110 ide_hwgroup_t *mate_hwgroup = hwif->mate ? hwif->mate->hwgroup : NULL;
111 unsigned long uninitialized_var(flags);
111 112
112 printk("%s: setting umc8672 to PIO mode%d (speed %d)\n", 113 printk("%s: setting umc8672 to PIO mode%d (speed %d)\n",
113 drive->name, pio, pio_to_umc[pio]); 114 drive->name, pio, pio_to_umc[pio]);
114 spin_lock_irqsave(&ide_lock, flags); 115 if (mate_hwgroup)
115 if (hwif->mate && hwif->mate->hwgroup->handler) { 116 spin_lock_irqsave(&mate_hwgroup->lock, flags);
117 if (mate_hwgroup && mate_hwgroup->handler) {
116 printk(KERN_ERR "umc8672: other interface is busy: exiting tune_umc()\n"); 118 printk(KERN_ERR "umc8672: other interface is busy: exiting tune_umc()\n");
117 } else { 119 } else {
118 current_speeds[drive->name[2] - 'a'] = pio_to_umc[pio]; 120 current_speeds[drive->name[2] - 'a'] = pio_to_umc[pio];
119 umc_set_speeds(current_speeds); 121 umc_set_speeds(current_speeds);
120 } 122 }
121 spin_unlock_irqrestore(&ide_lock, flags); 123 if (mate_hwgroup)
124 spin_unlock_irqrestore(&mate_hwgroup->lock, flags);
122} 125}
123 126
124static const struct ide_port_ops umc8672_port_ops = { 127static const struct ide_port_ops umc8672_port_ops = {