diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2015-01-26 02:15:02 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-01-28 11:25:28 -0800 |
commit | 2be90fef97ada3df61736435dc9ef6c3e432a747 (patch) | |
tree | 3517dcb60259eb33da184442bbf757b0e28910ff /drivers/staging/unisys | |
parent | 1167ff91da290cefc6e985c741dcab2a58c62452 (diff) |
drivers/staging: use current->state helpers
Call __set_current_state() instead of assigning the new state directly.
These interfaces also aid CONFIG_DEBUG_ATOMIC_SLEEP environments,
keeping track of who changed the state.
Signed-off-by: Davidlohr Bueso <dbueso@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys')
-rw-r--r-- | drivers/staging/unisys/include/timskmod.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/unisys/include/timskmod.h b/drivers/staging/unisys/include/timskmod.h index cff7983dab85..4019a0d63645 100644 --- a/drivers/staging/unisys/include/timskmod.h +++ b/drivers/staging/unisys/include/timskmod.h @@ -133,7 +133,7 @@ * x - the number of seconds to sleep. */ #define SLEEP(x) \ - do { current->state = TASK_INTERRUPTIBLE; \ + do { __set_current_state(TASK_INTERRUPTIBLE); \ schedule_timeout((x)*HZ); \ } while (0) @@ -141,7 +141,7 @@ * x - the number of jiffies to sleep. */ #define SLEEPJIFFIES(x) \ - do { current->state = TASK_INTERRUPTIBLE; \ + do { __set_current_state(TASK_INTERRUPTIBLE); \ schedule_timeout(x); \ } while (0) |