Commit f7440b0e authored by Robert P. J. Day's avatar Robert P. J. Day Committed by Linus Torvalds

mfd: use shorter set_current_state()

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: default avatarRobert P. J. Day <rpjday@crashcourse.ca>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Dmitry Torokhov <dtor@mail.ru>
Cc: Nicolas Pitre <nico@cam.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 61711f8f
...@@ -204,8 +204,7 @@ static inline int ucb1x00_ts_pen_down(struct ucb1x00_ts *ts) ...@@ -204,8 +204,7 @@ static inline int ucb1x00_ts_pen_down(struct ucb1x00_ts *ts)
static int ucb1x00_thread(void *_ts) static int ucb1x00_thread(void *_ts)
{ {
struct ucb1x00_ts *ts = _ts; struct ucb1x00_ts *ts = _ts;
struct task_struct *tsk = current; DECLARE_WAITQUEUE(wait, current);
DECLARE_WAITQUEUE(wait, tsk);
int valid = 0; int valid = 0;
set_freezable(); set_freezable();
...@@ -234,7 +233,7 @@ static int ucb1x00_thread(void *_ts) ...@@ -234,7 +233,7 @@ static int ucb1x00_thread(void *_ts)
if (ucb1x00_ts_pen_down(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_enable_irq(ts->ucb, UCB_IRQ_TSPX, machine_is_collie() ? UCB_RISING : UCB_FALLING);
ucb1x00_disable(ts->ucb); ucb1x00_disable(ts->ucb);
...@@ -262,7 +261,7 @@ static int ucb1x00_thread(void *_ts) ...@@ -262,7 +261,7 @@ static int ucb1x00_thread(void *_ts)
valid = 1; valid = 1;
} }
set_task_state(tsk, TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
timeout = HZ / 100; timeout = HZ / 100;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment