linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wim Van Sebroeck <wim@iguana.be>
To: Muhammad Falak R Wani <falakreyaz@gmail.com>
Cc: Guenter Roeck <linux@roeck-us.net>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] watchdog: shwdt: Use setup_timer()
Date: Sat, 14 May 2016 20:34:56 +0200	[thread overview]
Message-ID: <20160514183456.GG21026@spo001.leaseweb.nl> (raw)
In-Reply-To: <1462539581-26207-2-git-send-email-falakreyaz@gmail.com>

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.

  parent reply	other threads:[~2016-05-14 18:35 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2016-05-10 21:51 ` [PATCH 1/2] watchdog: cpwd: " Guenter Roeck
2016-05-14 18:34 ` Wim Van Sebroeck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160514183456.GG21026@spo001.leaseweb.nl \
    --to=wim@iguana.be \
    --cc=falakreyaz@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=linux@roeck-us.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).