watchdog: cpwd: Use setup_timer()
PATCH 1/2 watchdog: cpwd: Use setup_timer()
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.
--- drivers/watchdog/cpwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/watchdog/cpwd.c +1 -3
@@ -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",
Signature · 1 line
1.9.1
PATCH 2/2 watchdog: shwdt: Use setup_timer()
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.
--- drivers/watchdog/shwdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/watchdog/shwdt.c +1 -3
@@ -275,9 +275,7 @@ static int sh_wdt_probe(struct platform_device *pdev)return rc; } -init_timer (&wdt->timer); - wdt->timer.function = sh_wdt_ping; - wdt->timer.data = (unsigned long )wdt; +setup_timer (&wdt->timer, sh_wdt_ping, (unsigned long )wdt); wdt->timer.expires =next_ping_period (clock_division_ratio);dev_info (&pdev->dev,"initialized.\n" );
Signature · 1 line
1.9.1
Re: [PATCH 2/2] watchdog: shwdt: Use setup_timer()
Quoted 6 lines · Muhammad Falak R Wani
The function
setup_timercombines 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 functionsetup_timer.Signed-off-by Muhammad Falak R Wani <[email protected]>
Quoted 26 lines
--- drivers/watchdog/shwdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/watchdog/shwdt.c +1
-3@@ -275,9 +275,7 @@ static int sh_wdt_probe(struct platform_device *pdev)return rc; } -init_timer (&wdt->timer); - wdt->timer.function = sh_wdt_ping; - wdt->timer.data = (unsigned long )wdt; +setup_timer (&wdt->timer, sh_wdt_ping, (unsigned long )wdt); wdt->timer.expires =next_ping_period (clock_division_ratio);dev_info (&pdev->dev,"initialized.\n" );Signature · 6 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] watchdog: shwdt: Use setup_timer()
In reply to Muhammad Falak R WaniHi Muhammed,
Quoted 28 lines
The function
setup_timercombines 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 functionsetup_timer.Signed-off-by Muhammad Falak R Wani <[email protected]>--- drivers/watchdog/shwdt.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/watchdog/shwdt.c +1
-3@@ -275,9 +275,7 @@ static int sh_wdt_probe(struct platform_device *pdev)return rc; } -init_timer (&wdt->timer); - wdt->timer.function = sh_wdt_ping; - wdt->timer.data = (unsigned long )wdt; +setup_timer (&wdt->timer, sh_wdt_ping, (unsigned long )wdt); wdt->timer.expires =next_ping_period (clock_division_ratio);dev_info (&pdev->dev,"initialized.\n" );Signature · 1 line
1.9.1
This patch was added to linux-watchdog-next.
Kind Regards,
Wim.
Quoted 6 lines · Muhammad Falak R Wani
The function
setup_timercombines 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 functionsetup_timer.Signed-off-by Muhammad Falak R Wani <[email protected]>
Quoted 22 lines
--- drivers/watchdog/cpwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/watchdog/cpwd.c +1
-3@@ -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",Signature · 1 line
1.9.1
Hi Muhammed,
Quoted 28 lines
The function
setup_timercombines 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 functionsetup_timer.Signed-off-by Muhammad Falak R Wani <[email protected]>--- drivers/watchdog/cpwd.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)drivers/watchdog/cpwd.c +1
-3@@ -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",Signature · 1 line
1.9.1
This patch was added to linux-watchdog-next.
Kind Regards,
Wim.