From: Jonathan Cameron <jic23@kernel.org>
To: Aishwarya R <aishwaryarj100@gmail.com>
Cc: Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
NXP Linux Team <linux-imx@nxp.com>,
Enrico Weigelt <info@metux.net>,
Thomas Gleixner <tglx@linutronix.de>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Stephen Boyd <swboyd@chromium.org>,
linux-iio@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: fsl-imx25-gcq: Use devm_platform_ioremap_resource
Date: Mon, 13 Apr 2020 16:37:39 +0100 [thread overview]
Message-ID: <20200413163739.38474d8a@archlinux> (raw)
In-Reply-To: <20200412135023.3831-1-aishwaryarj100@gmail.com>
On Sun, 12 Apr 2020 19:20:20 +0530
Aishwarya R <aishwaryarj100@gmail.com> wrote:
> From: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
>
> Use the helper function that wraps the calls to
> platform_get_resource() and devm_ioremap_resource()
> together.It reduces boilerplate and suggested by coccinelle.
>
> Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com>
Again see earlier patches for comments but applied anyway to
save myself time.
Applied to the togreg branch of iio.git and pushed out as testing for
the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/adc/fsl-imx25-gcq.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
> index fa71489195c6..b0a4dc88ba9b 100644
> --- a/drivers/iio/adc/fsl-imx25-gcq.c
> +++ b/drivers/iio/adc/fsl-imx25-gcq.c
> @@ -294,7 +294,6 @@ static int mx25_gcq_probe(struct platform_device *pdev)
> struct mx25_gcq_priv *priv;
> struct mx25_tsadc *tsadc = dev_get_drvdata(pdev->dev.parent);
> struct device *dev = &pdev->dev;
> - struct resource *res;
> void __iomem *mem;
> int ret;
> int i;
> @@ -305,8 +304,7 @@ static int mx25_gcq_probe(struct platform_device *pdev)
>
> priv = iio_priv(indio_dev);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - mem = devm_ioremap_resource(dev, res);
> + mem = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(mem))
> return PTR_ERR(mem);
>
prev parent reply other threads:[~2020-04-13 15:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-09 15:13 [PATCH] iio: adc: fsl-imx25-gcq: Use devm_platform_ioremap_resource Aishwarya R
2020-04-12 10:25 ` Jonathan Cameron
2020-04-12 13:50 ` Aishwarya R
2020-04-13 15:37 ` Jonathan Cameron [this message]
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=20200413163739.38474d8a@archlinux \
--to=jic23@kernel.org \
--cc=aishwaryarj100@gmail.com \
--cc=festevam@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=info@metux.net \
--cc=kernel@pengutronix.de \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=swboyd@chromium.org \
--cc=tglx@linutronix.de \
/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