X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fmfd%2Fucb1x00-ts.c;h=44762ca86a8d45bbe41e640d7a4d22c2e098ac83;hb=04489eeb02a40bc15029886cef7285ada3ab0de6;hp=38e815a2e87135227f16095607a2a588a38d6aab;hpb=eedab661a51966c454e38c17266a531aa58b4a98;p=linux-2.6 diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c index 38e815a2e8..44762ca86a 100644 --- a/drivers/mfd/ucb1x00-ts.c +++ b/drivers/mfd/ucb1x00-ts.c @@ -32,8 +32,7 @@ #include #include -#include -#include +#include #include #include "ucb1x00.h" @@ -205,10 +204,10 @@ static inline int ucb1x00_ts_pen_down(struct ucb1x00_ts *ts) static int ucb1x00_thread(void *_ts) { struct ucb1x00_ts *ts = _ts; - struct task_struct *tsk = current; - DECLARE_WAITQUEUE(wait, tsk); + DECLARE_WAITQUEUE(wait, current); int valid = 0; + set_freezable(); add_wait_queue(&ts->irq_wait, &wait); while (!kthread_should_stop()) { unsigned int x, y, p; @@ -234,7 +233,7 @@ static int ucb1x00_thread(void *_ts) if (ucb1x00_ts_pen_down(ts)) { - set_task_state(tsk, TASK_INTERRUPTIBLE); + set_current_state(TASK_INTERRUPTIBLE); ucb1x00_enable_irq(ts->ucb, UCB_IRQ_TSPX, machine_is_collie() ? UCB_RISING : UCB_FALLING); ucb1x00_disable(ts->ucb); @@ -262,7 +261,7 @@ static int ucb1x00_thread(void *_ts) valid = 1; } - set_task_state(tsk, TASK_INTERRUPTIBLE); + set_current_state(TASK_INTERRUPTIBLE); timeout = HZ / 100; }