diff options
| author | 2017-11-13 15:36:33 +0000 | |
|---|---|---|
| committer | 2017-11-13 15:36:33 +0000 | |
| commit | 81445e63e67a1e98b1c2575fa2b406d4289d2754 (patch) | |
| tree | 2d121d1873b3e8ec7b71086c4db2f5cb207a46ec /drivers/base/power/main.c | |
| parent | Merge branch 'net-improve-the-process-of-redirect-and-toobig-for-ipv6-tunnels' (diff) | |
| parent | timers: Add a function to start/reduce a timer (diff) | |
| download | linux-dev-81445e63e67a1e98b1c2575fa2b406d4289d2754.tar.xz linux-dev-81445e63e67a1e98b1c2575fa2b406d4289d2754.zip | |
Merge remote-tracking branch 'tip/timers/core' into afs-next
These AFS patches need the timer_reduce() patch from timers/core.
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/base/power/main.c')
| -rw-r--r-- | drivers/base/power/main.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c index 770b1539a083..ae47b2ec84b4 100644 --- a/drivers/base/power/main.c +++ b/drivers/base/power/main.c @@ -478,9 +478,9 @@ struct dpm_watchdog { * There's not much we can do here to recover so panic() to * capture a crash-dump in pstore. */ -static void dpm_watchdog_handler(unsigned long data) +static void dpm_watchdog_handler(struct timer_list *t) { - struct dpm_watchdog *wd = (void *)data; + struct dpm_watchdog *wd = from_timer(wd, t, timer); dev_emerg(wd->dev, "**** DPM device timeout ****\n"); show_stack(wd->tsk, NULL); @@ -500,11 +500,9 @@ static void dpm_watchdog_set(struct dpm_watchdog *wd, struct device *dev) wd->dev = dev; wd->tsk = current; - init_timer_on_stack(timer); + timer_setup_on_stack(timer, dpm_watchdog_handler, 0); /* use same timeout value for both suspend and resume */ timer->expires = jiffies + HZ * CONFIG_DPM_WATCHDOG_TIMEOUT; - timer->function = dpm_watchdog_handler; - timer->data = (unsigned long)wd; add_timer(timer); } |
