diff options
author | Guenter Roeck <groeck@chromium.org> | 2016-03-03 09:44:44 -0800 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2016-04-07 16:49:57 +0530 |
commit | 267687882304f817e75e7f9a439ecb5b8f579a34 (patch) | |
tree | 619387f45550ce097f1a415e60f808f733c67534 /drivers/base | |
parent | c37e85aae233519567c82a34a6201cf95f1280a6 (diff) |
drivers: power: use 'current' instead of 'get_current()'
get_current() to get the current thread pointer is not defined for all
architectures. This results in the following build error for several
architectures (s390, powerpc, and possibly others).
drivers/base/power/main.c: In function '__device_suspend':
drivers/base/power/main.c:1415:2: error:
implicit declaration of function 'get_current'
Use 'current' instead. Also include asm/current.h instead of depending on
an implicit include.
Fixes: ad86cc8ad632 ("drivers: power: Add watchdog timer to catch drivers which lockup during suspend."
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/power/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index a54d810f2966..6ed8b9326629 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -35,6 +35,8 @@ #include <linux/timer.h> #include <linux/wakeup_reason.h> +#include <asm/current.h> + #include "../base.h" #include "power.h" @@ -1412,7 +1414,7 @@ static int __device_suspend(struct device *dev, pm_message_t state, bool async) goto Complete; data.dev = dev; - data.tsk = get_current(); + data.tsk = current; init_timer_on_stack(&timer); timer.expires = jiffies + HZ * 12; timer.function = dpm_drv_timeout; |