aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKees Cook <keescook@chromium.org>2017-10-21 01:47:37 -0400
committerKees Cook <keescook@chromium.org>2017-11-02 18:50:26 -0400
commit4fa42b4e5ddca6a58d8fcf24d51e6fe2f8c50253 (patch)
treeff555238063a91257550b7097ebb0480bb42b52f
parent8da0edf2f90b6c74b69ad420fdd230c9bd2bd1ed (diff)
watchdog: cpwd: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Switches to using the global that is used everywhere else. Cc: Wim Van Sebroeck <wim@iguana.be> Cc: linux-watchdog@vger.kernel.org Signed-off-by: Kees Cook <keescook@chromium.org> Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r--drivers/watchdog/cpwd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 3d43775548e5..aee0b25cf10d 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -230,9 +230,9 @@ static void cpwd_resetbrokentimer(struct cpwd *p, int index)
230 * interrupts within the PLD so me must continually 230 * interrupts within the PLD so me must continually
231 * reset the timers ad infinitum. 231 * reset the timers ad infinitum.
232 */ 232 */
233static void cpwd_brokentimer(unsigned long data) 233static void cpwd_brokentimer(struct timer_list *unused)
234{ 234{
235 struct cpwd *p = (struct cpwd *) data; 235 struct cpwd *p = cpwd_device;
236 int id, tripped = 0; 236 int id, tripped = 0;
237 237
238 /* kill a running timer instance, in case we 238 /* kill a running timer instance, in case we
@@ -275,7 +275,7 @@ static void cpwd_stoptimer(struct cpwd *p, int index)
275 275
276 if (p->broken) { 276 if (p->broken) {
277 p->devs[index].runstatus |= WD_STAT_BSTOP; 277 p->devs[index].runstatus |= WD_STAT_BSTOP;
278 cpwd_brokentimer((unsigned long) p); 278 cpwd_brokentimer(NULL);
279 } 279 }
280 } 280 }
281} 281}
@@ -608,7 +608,7 @@ static int cpwd_probe(struct platform_device *op)
608 } 608 }
609 609
610 if (p->broken) { 610 if (p->broken) {
611 setup_timer(&cpwd_timer, cpwd_brokentimer, (unsigned long)p); 611 timer_setup(&cpwd_timer, cpwd_brokentimer, 0);
612 cpwd_timer.expires = WD_BTIMEOUT; 612 cpwd_timer.expires = WD_BTIMEOUT;
613 613
614 pr_info("PLD defect workaround enabled for model %s\n", 614 pr_info("PLD defect workaround enabled for model %s\n",