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 4/5] watchdog: riowd: use platform_{get,set}_drvdata()
Date: Fri, 24 May 2013 07:59:27 -0700 [thread overview]
Message-ID: <20130524145927.GE6085@roeck-us.net> (raw)
In-Reply-To: <003701ce57a2$864a0740$92de15c0$@samsung.com>
On Thu, May 23, 2013 at 07:44:38PM +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/riowd.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/watchdog/riowd.c b/drivers/watchdog/riowd.c
> index 0040451..4f99f12 100644
> --- a/drivers/watchdog/riowd.c
> +++ b/drivers/watchdog/riowd.c
> @@ -206,7 +206,7 @@ static int riowd_probe(struct platform_device *op)
> pr_info("Hardware watchdog [%i minutes], regs at %p\n",
> riowd_timeout, p->regs);
>
> - dev_set_drvdata(&op->dev, p);
> + platform_set_drvdata(op, p);
> return 0;
>
> out_iounmap:
> @@ -222,7 +222,7 @@ out:
>
> static int riowd_remove(struct platform_device *op)
> {
> - struct riowd *p = dev_get_drvdata(&op->dev);
> + struct riowd *p = platform_get_drvdata(op);
>
> misc_deregister(&riowd_miscdev);
> of_iounmap(&op->resource[0], p->regs, 2);
> --
> 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 Jingoo Han
2013-05-24 14:59 ` Guenter Roeck [this message]
2013-05-25 19: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=20130524145927.GE6085@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
Powered by JetHome