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 2/5] watchdog: da9052: use platform_{get,set}_drvdata()
Date: Fri, 24 May 2013 07:58:50 -0700 [thread overview]
Message-ID: <20130524145850.GC6085@roeck-us.net> (raw)
In-Reply-To: <003501ce57a2$749344d0$5db9ce70$@samsung.com>
On Thu, May 23, 2013 at 07:44:09PM +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/da9052_wdt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/da9052_wdt.c b/drivers/watchdog/da9052_wdt.c
> index 3674450..f09c54e 100644
> --- a/drivers/watchdog/da9052_wdt.c
> +++ b/drivers/watchdog/da9052_wdt.c
> @@ -215,14 +215,14 @@ static int da9052_wdt_probe(struct platform_device *pdev)
> goto err;
> }
>
> - dev_set_drvdata(&pdev->dev, driver_data);
> + platform_set_drvdata(pdev, driver_data);
> err:
> return ret;
> }
>
> static int da9052_wdt_remove(struct platform_device *pdev)
> {
> - struct da9052_wdt_data *driver_data = dev_get_drvdata(&pdev->dev);
> + struct da9052_wdt_data *driver_data = platform_get_drvdata(pdev);
>
> watchdog_unregister_device(&driver_data->wdt);
> kref_put(&driver_data->kref, da9052_wdt_release_resources);
> --
> 1.7.10.4
>
>
>
next prev parent 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 2/5] watchdog: da9052: use platform_{get,set}_drvdata() Jingoo Han
2013-05-24 14:58 ` 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=20130524145850.GC6085@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