From: "Robert P. J. Day" Since this routine declares a separate "tsk" pointer for no other reason than to call set_task_state(), get rid of it and just invoke set_current_state(). Signed-off-by: Robert P. J. Day Cc: Russell King Cc: Dmitry Torokhov Cc: Nicolas Pitre Signed-off-by: Andrew Morton --- drivers/mfd/ucb1x00-ts.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff -puN drivers/mfd/ucb1x00-ts.c~mfd-use-shorter-set_current_state drivers/mfd/ucb1x00-ts.c --- a/drivers/mfd/ucb1x00-ts.c~mfd-use-shorter-set_current_state +++ a/drivers/mfd/ucb1x00-ts.c @@ -205,8 +205,7 @@ static inline int ucb1x00_ts_pen_down(st 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(); @@ -235,7 +234,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); @@ -263,7 +262,7 @@ static int ucb1x00_thread(void *_ts) valid = 1; } - set_task_state(tsk, TASK_INTERRUPTIBLE); + set_current_state(TASK_INTERRUPTIBLE); timeout = HZ / 100; } _