Skip to content

Commit

Permalink
mfd: use shorter set_current_state()
Browse files Browse the repository at this point in the history
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 <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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Robert P. J. Day authored and Linus Torvalds committed Apr 28, 2008
1 parent 61711f8 commit f7440b0
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions drivers/mfd/ucb1x00-ts.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,7 @@ 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();
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit f7440b0

Please sign in to comment.