linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] watchdog: cpwd: Use setup_timer()
@ 2016-05-06 12:59 Muhammad Falak R Wani
  2016-05-06 12:59 ` [PATCH 2/2] watchdog: shwdt: " Muhammad Falak R Wani
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Muhammad Falak R Wani @ 2016-05-06 12:59 UTC (permalink / raw)
  To: Wim Van Sebroeck; +Cc: Guenter Roeck, linux-watchdog, linux-kernel

The function setup_timer combines the initialization of a timer with
the initialization of the timer's function and data fields.
The multiline code for timer initialization is now replaced
with function setup_timer.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
---
 drivers/watchdog/cpwd.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/watchdog/cpwd.c b/drivers/watchdog/cpwd.c
index 0200768..71ee079 100644
--- a/drivers/watchdog/cpwd.c
+++ b/drivers/watchdog/cpwd.c
@@ -611,9 +611,7 @@ static int cpwd_probe(struct platform_device *op)
 	}
 
 	if (p->broken) {
-		init_timer(&cpwd_timer);
-		cpwd_timer.function	= cpwd_brokentimer;
-		cpwd_timer.data		= (unsigned long) p;
+		setup_timer(&cpwd_timer, cpwd_brokentimer, (unsigned long)p);
 		cpwd_timer.expires	= WD_BTIMEOUT;
 
 		pr_info("PLD defect workaround enabled for model %s\n",
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-05-14 18:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-06 12:59 [PATCH 1/2] watchdog: cpwd: Use setup_timer() Muhammad Falak R Wani
2016-05-06 12:59 ` [PATCH 2/2] watchdog: shwdt: " Muhammad Falak R Wani
2016-05-10 21:52   ` Guenter Roeck
2016-05-14 18:34   ` Wim Van Sebroeck
2016-05-10 21:51 ` [PATCH 1/2] watchdog: cpwd: " Guenter Roeck
2016-05-14 18:34 ` Wim Van Sebroeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).