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 5/5] watchdog: wm831x: use platform_{get,set}_drvdata()
Date: Fri, 24 May 2013 07:59:46 -0700 [thread overview]
Message-ID: <20130524145946.GF6085@roeck-us.net> (raw)
In-Reply-To: <003801ce57a2$8f0dae40$ad290ac0$@samsung.com>
On Thu, May 23, 2013 at 07:44:53PM +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/wm831x_wdt.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/wm831x_wdt.c b/drivers/watchdog/wm831x_wdt.c
> index 9dcb6d0..6c302fd 100644
> --- a/drivers/watchdog/wm831x_wdt.c
> +++ b/drivers/watchdog/wm831x_wdt.c
> @@ -281,7 +281,7 @@ static int wm831x_wdt_probe(struct platform_device *pdev)
> goto err_gpio;
> }
>
> - dev_set_drvdata(&pdev->dev, driver_data);
> + platform_set_drvdata(pdev, driver_data);
>
> return 0;
>
> @@ -294,7 +294,7 @@ err:
>
> static int wm831x_wdt_remove(struct platform_device *pdev)
> {
> - struct wm831x_wdt_drvdata *driver_data = dev_get_drvdata(&pdev->dev);
> + struct wm831x_wdt_drvdata *driver_data = platform_get_drvdata(pdev);
>
> watchdog_unregister_device(&driver_data->wdt);
>
> --
> 1.7.10.4
>
>
>
next prev parent reply other threads:[~2013-05-24 14:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-23 10:44 [PATCH 5/5] watchdog: wm831x: use platform_{get,set}_drvdata() Jingoo Han
2013-05-24 14:59 ` Guenter Roeck [this message]
2013-05-26 13:13 ` 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=20130524145946.GF6085@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