Linux Watchdog driver development
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Jingoo Han <jg1.han@samsung.com>
Cc: 'Andrew Morton' <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org, 'Wim Van Sebroeck' <wim@iguana.be>,
	linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 3/5] watchdog: da9055: use platform_{get,set}_drvdata()
Date: Fri, 24 May 2013 07:59:07 -0700	[thread overview]
Message-ID: <20130524145907.GD6085@roeck-us.net> (raw)
In-Reply-To: <003601ce57a2$7d2617d0$77724770$@samsung.com>

On Thu, May 23, 2013 at 07:44:23PM +0900, Jingoo Han wrote:
> Use the wrapper functions for getting and setting the driver data using
> platform_device instead of using dev_{get,set}_drvdata() with &pdev->dev,
> so we can directly pass a struct platform_device.
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

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

> ---
>  drivers/watchdog/da9055_wdt.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/watchdog/da9055_wdt.c b/drivers/watchdog/da9055_wdt.c
> index f5ad105..575f37a 100644
> --- a/drivers/watchdog/da9055_wdt.c
> +++ b/drivers/watchdog/da9055_wdt.c
> @@ -174,7 +174,7 @@ static int da9055_wdt_probe(struct platform_device *pdev)
>  		goto err;
>  	}
>  
> -	dev_set_drvdata(&pdev->dev, driver_data);
> +	platform_set_drvdata(pdev, driver_data);
>  
>  	ret = watchdog_register_device(&driver_data->wdt);
>  	if (ret != 0)
> @@ -187,7 +187,7 @@ err:
>  
>  static int da9055_wdt_remove(struct platform_device *pdev)
>  {
> -	struct da9055_wdt_data *driver_data = dev_get_drvdata(&pdev->dev);
> +	struct da9055_wdt_data *driver_data = platform_get_drvdata(pdev);
>  
>  	watchdog_unregister_device(&driver_data->wdt);
>  	kref_put(&driver_data->kref, da9055_wdt_release_resources);
> -- 
> 1.7.10.4
> 
> 
> 

  reply	other threads:[~2013-05-24 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-23 10:44 [PATCH 3/5] watchdog: da9055: use platform_{get,set}_drvdata() Jingoo Han
2013-05-24 14:59 ` Guenter Roeck [this message]
2013-05-26 13:36 ` 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=20130524145907.GD6085@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=akpm@linux-foundation.org \
    --cc=jg1.han@samsung.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@iguana.be \
    /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