提交 705a76d2 编写于 作者: T Thierry Reding 提交者: Dmitry Torokhov

Input: tsc2007 - fix locking in hrtimer handler

Now that hrtimers are always running in hard irq context we can't
unconditionally enable interrupts at the end of the timer function.
Signed-off-by: NThierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: NKwangwoo Lee <kwangwoo.lee@gmail.com>
Signed-off-by: NDmitry Torokhov <dtor@mail.ru>
上级 9166d0f6
......@@ -200,8 +200,9 @@ static int tsc2007_read_values(struct tsc2007 *tsc)
static enum hrtimer_restart tsc2007_timer(struct hrtimer *handle)
{
struct tsc2007 *ts = container_of(handle, struct tsc2007, timer);
unsigned long flags;
spin_lock_irq(&ts->lock);
spin_lock_irqsave(&ts->lock, flags);
if (unlikely(!ts->get_pendown_state() && ts->pendown)) {
struct input_dev *input = ts->input;
......@@ -222,7 +223,7 @@ static enum hrtimer_restart tsc2007_timer(struct hrtimer *handle)
tsc2007_send_event(ts);
}
spin_unlock_irq(&ts->lock);
spin_unlock_irqrestore(&ts->lock, flags);
return HRTIMER_NORESTART;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册