|
@@ -926,31 +926,21 @@ static struct midi_operations mpu401_midi_operations[MAX_MIDI_DEV];
|
|
static void mpu401_chk_version(int n, struct mpu_config *devc)
|
|
static void mpu401_chk_version(int n, struct mpu_config *devc)
|
|
{
|
|
{
|
|
int tmp;
|
|
int tmp;
|
|
- unsigned long flags;
|
|
|
|
|
|
|
|
devc->version = devc->revision = 0;
|
|
devc->version = devc->revision = 0;
|
|
|
|
|
|
- spin_lock_irqsave(&devc->lock,flags);
|
|
|
|
- if ((tmp = mpu_cmd(n, 0xAC, 0)) < 0)
|
|
|
|
- {
|
|
|
|
- spin_unlock_irqrestore(&devc->lock,flags);
|
|
|
|
|
|
+ tmp = mpu_cmd(n, 0xAC, 0);
|
|
|
|
+ if (tmp < 0)
|
|
return;
|
|
return;
|
|
- }
|
|
|
|
if ((tmp & 0xf0) > 0x20) /* Why it's larger than 2.x ??? */
|
|
if ((tmp & 0xf0) > 0x20) /* Why it's larger than 2.x ??? */
|
|
- {
|
|
|
|
- spin_unlock_irqrestore(&devc->lock,flags);
|
|
|
|
return;
|
|
return;
|
|
- }
|
|
|
|
devc->version = tmp;
|
|
devc->version = tmp;
|
|
|
|
|
|
- if ((tmp = mpu_cmd(n, 0xAD, 0)) < 0)
|
|
|
|
- {
|
|
|
|
|
|
+ if ((tmp = mpu_cmd(n, 0xAD, 0)) < 0) {
|
|
devc->version = 0;
|
|
devc->version = 0;
|
|
- spin_unlock_irqrestore(&devc->lock,flags);
|
|
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
devc->revision = tmp;
|
|
devc->revision = tmp;
|
|
- spin_unlock_irqrestore(&devc->lock,flags);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
int attach_mpu401(struct address_info *hw_config, struct module *owner)
|
|
int attach_mpu401(struct address_info *hw_config, struct module *owner)
|