@@ -380,8 +380,9 @@ static void ml_ff_set_gain(struct input_dev *dev, u16 gain)
{
struct ml_device *ml = dev->ff->private;
int i;
+ unsigned long flags;
- spin_lock_bh(&ml->timer_lock);
+ spin_lock_irqsave(&ml->timer_lock, flags);
ml->gain = gain;
@@ -390,7 +391,7 @@ static void ml_ff_set_gain(struct input_dev *dev, u16 gain)
ml_play_effects(ml);
- spin_unlock_bh(&ml->timer_lock);
+ spin_unlock_irqrestore(&ml->timer_lock, flags);
}
static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)