From: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
To: ext Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Cc: Wolfram Sang <wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org>,
Linux OMAP Mailing List
<linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>,
Linux ARM Kernel Mailing List
<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [PATCH 1/3] i2c: omap: switch to dev_get_drvdata()
Date: Thu, 9 Jul 2015 12:09:01 +0200 [thread overview]
Message-ID: <559E483D.1020206@nokia.com> (raw)
In-Reply-To: <1435260890-32335-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
Hi!
On 25/06/15 21:34, ext Felipe Balbi wrote:
> there's no need to fetch the platform_device
> in order to dereference it back to the dev
> pointer to access drvdata, we can use
> dev_get_drvdata() instead.
>
> Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>
Acked-by: Alexander Sverdlin <alexander.sverdlin-xNZwKgViW5gAvxtiuMwx3w@public.gmane.org>
> ---
> drivers/i2c/busses/i2c-omap.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 0e894193accf..00712c1cf3c0 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1403,8 +1403,7 @@ static int omap_i2c_remove(struct platform_device *pdev)
> #ifdef CONFIG_PM
> static int omap_i2c_runtime_suspend(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
> + struct omap_i2c_dev *_dev = dev_get_drvdata(dev);
>
> _dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG);
>
> @@ -1428,8 +1427,7 @@ static int omap_i2c_runtime_suspend(struct device *dev)
>
> static int omap_i2c_runtime_resume(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
> + struct omap_i2c_dev *_dev = dev_get_drvdata(dev);
>
> if (!_dev->regs)
> return 0;
--
Best regards,
Alexander Sverdlin.
WARNING: multiple messages have this Message-ID (diff)
From: alexander.sverdlin@nokia.com (Alexander Sverdlin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/3] i2c: omap: switch to dev_get_drvdata()
Date: Thu, 9 Jul 2015 12:09:01 +0200 [thread overview]
Message-ID: <559E483D.1020206@nokia.com> (raw)
In-Reply-To: <1435260890-32335-1-git-send-email-balbi@ti.com>
Hi!
On 25/06/15 21:34, ext Felipe Balbi wrote:
> there's no need to fetch the platform_device
> in order to dereference it back to the dev
> pointer to access drvdata, we can use
> dev_get_drvdata() instead.
>
> Signed-off-by: Felipe Balbi <balbi@ti.com>
Acked-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
> ---
> drivers/i2c/busses/i2c-omap.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c
> index 0e894193accf..00712c1cf3c0 100644
> --- a/drivers/i2c/busses/i2c-omap.c
> +++ b/drivers/i2c/busses/i2c-omap.c
> @@ -1403,8 +1403,7 @@ static int omap_i2c_remove(struct platform_device *pdev)
> #ifdef CONFIG_PM
> static int omap_i2c_runtime_suspend(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
> + struct omap_i2c_dev *_dev = dev_get_drvdata(dev);
>
> _dev->iestate = omap_i2c_read_reg(_dev, OMAP_I2C_IE_REG);
>
> @@ -1428,8 +1427,7 @@ static int omap_i2c_runtime_suspend(struct device *dev)
>
> static int omap_i2c_runtime_resume(struct device *dev)
> {
> - struct platform_device *pdev = to_platform_device(dev);
> - struct omap_i2c_dev *_dev = platform_get_drvdata(pdev);
> + struct omap_i2c_dev *_dev = dev_get_drvdata(dev);
>
> if (!_dev->regs)
> return 0;
--
Best regards,
Alexander Sverdlin.
next prev parent reply other threads:[~2015-07-09 10:09 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-25 19:34 [PATCH 1/3] i2c: omap: switch to dev_get_drvdata() Felipe Balbi
2015-06-25 19:34 ` Felipe Balbi
[not found] ` <1435260890-32335-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2015-06-25 19:34 ` [PATCH 2/3] i2c: omap: abolish variable name confusion Felipe Balbi
2015-06-25 19:34 ` Felipe Balbi
[not found] ` <1435260890-32335-2-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2015-07-09 19:49 ` Wolfram Sang
2015-07-09 19:49 ` Wolfram Sang
2015-07-10 17:27 ` Felipe Balbi
2015-07-10 17:27 ` Felipe Balbi
[not found] ` <20150710172701.GB20408-HgARHv6XitJaoMGHk7MhZQC/G2K4zDHf@public.gmane.org>
2015-07-13 20:38 ` [PATCH 1/3] i2c: omap: switch to dev_get_drvdata() Felipe Balbi
2015-07-13 20:38 ` Felipe Balbi
[not found] ` <1436819884-1614-1-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2015-07-13 20:38 ` [PATCH 2/3] i2c: omap: abolish variable name confusion Felipe Balbi
2015-07-13 20:38 ` Felipe Balbi
2015-07-13 20:38 ` [PATCH 3/3] i2c: omap: on ->remove() call pm_runtime_put_sync() Felipe Balbi
2015-07-13 20:38 ` Felipe Balbi
2015-07-14 11:02 ` [PATCH 1/3] i2c: omap: switch to dev_get_drvdata() Wolfram Sang
2015-07-14 11:02 ` Wolfram Sang
2015-06-25 19:34 ` [PATCH 3/3] i2c: omap: on ->remove() call pm_runtime_put_sync() Felipe Balbi
2015-06-25 19:34 ` Felipe Balbi
[not found] ` <1435260890-32335-3-git-send-email-balbi-l0cyMroinI0@public.gmane.org>
2015-07-09 10:18 ` Alexander Sverdlin
2015-07-09 10:18 ` Alexander Sverdlin
2015-07-09 10:09 ` Alexander Sverdlin [this message]
2015-07-09 10:09 ` [PATCH 1/3] i2c: omap: switch to dev_get_drvdata() Alexander Sverdlin
2015-07-09 19:46 ` Wolfram Sang
2015-07-09 19:46 ` Wolfram Sang
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=559E483D.1020206@nokia.com \
--to=alexander.sverdlin-xnzwkgviw5gavxtiumwx3w@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org \
--cc=wsa-z923LK4zBo2bacvFa/9K2g@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.