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

* [PATCH 2/2] watchdog: shwdt: Use setup_timer()
  2016-05-06 12:59 [PATCH 1/2] watchdog: cpwd: Use setup_timer() Muhammad Falak R Wani
@ 2016-05-06 12:59 ` 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
  2 siblings, 2 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/shwdt.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
index f908121..517a733 100644
--- a/drivers/watchdog/shwdt.c
+++ b/drivers/watchdog/shwdt.c
@@ -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");
-- 
1.9.1

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

* Re: [PATCH 1/2] watchdog: cpwd: Use setup_timer()
  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:51 ` Guenter Roeck
  2016-05-14 18:34 ` Wim Van Sebroeck
  2 siblings, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2016-05-10 21:51 UTC (permalink / raw)
  To: Muhammad Falak R Wani; +Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel

On Fri, May 06, 2016 at 06:29:40PM +0530, Muhammad Falak R Wani wrote:
> 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>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  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	[flat|nested] 6+ messages in thread

* Re: [PATCH 2/2] watchdog: shwdt: Use setup_timer()
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Guenter Roeck @ 2016-05-10 21:52 UTC (permalink / raw)
  To: Muhammad Falak R Wani; +Cc: Wim Van Sebroeck, linux-watchdog, linux-kernel

On Fri, May 06, 2016 at 06:29:41PM +0530, Muhammad Falak R Wani wrote:
> 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>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/shwdt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
> index f908121..517a733 100644
> --- a/drivers/watchdog/shwdt.c
> +++ b/drivers/watchdog/shwdt.c
> @@ -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");
> -- 
> 1.9.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-watchdog" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 1/2] watchdog: cpwd: Use setup_timer()
  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:51 ` [PATCH 1/2] watchdog: cpwd: " Guenter Roeck
@ 2016-05-14 18:34 ` Wim Van Sebroeck
  2 siblings, 0 replies; 6+ messages in thread
From: Wim Van Sebroeck @ 2016-05-14 18:34 UTC (permalink / raw)
  To: Muhammad Falak R Wani; +Cc: Guenter Roeck, linux-watchdog, linux-kernel

Hi Muhammed,

> 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
> 

This patch was added to linux-watchdog-next.

Kind Regards,
Wim.

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

* Re: [PATCH 2/2] watchdog: shwdt: Use setup_timer()
  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
  1 sibling, 0 replies; 6+ messages in thread
From: Wim Van Sebroeck @ 2016-05-14 18:34 UTC (permalink / raw)
  To: Muhammad Falak R Wani; +Cc: Guenter Roeck, linux-watchdog, linux-kernel

Hi Muhammed,

> 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/shwdt.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/watchdog/shwdt.c b/drivers/watchdog/shwdt.c
> index f908121..517a733 100644
> --- a/drivers/watchdog/shwdt.c
> +++ b/drivers/watchdog/shwdt.c
> @@ -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");
> -- 
> 1.9.1
> 

This patch was added to linux-watchdog-next.

Kind Regards,
Wim.

^ permalink raw reply	[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).