From: Jonathan Cameron <jic23@kernel.org>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>, <linux-iio@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Alexander Sverdlin <alexander.sverdlin@gmail.com>
Subject: Re: [PATCH] iio: ep93xx: Make use of the helper function devm_platform_ioremap_resource()
Date: Sat, 11 Sep 2021 18:16:43 +0100 [thread overview]
Message-ID: <20210911181643.72d02489@jic23-huawei> (raw)
In-Reply-To: <20210908105646.1576-1-caihuoqing@baidu.com>
On Wed, 8 Sep 2021 18:56:45 +0800
Cai Huoqing <caihuoqing@baidu.com> wrote:
> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
>
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>
+CC Alexander who wrote this driver.
Given this one is less active than the others you've sent I'll pick it up now.
(the others will wait a few days to see if we get reviews from anyone else).
Applied to the togreg branch of iio.git and pushed out as testing for 0-day
to see if it can find anything we missed.
Thanks,
Jonathan
> ---
> drivers/iio/adc/ep93xx_adc.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/ep93xx_adc.c b/drivers/iio/adc/ep93xx_adc.c
> index 8edd6407b7c3..fd5a9404c8dc 100644
> --- a/drivers/iio/adc/ep93xx_adc.c
> +++ b/drivers/iio/adc/ep93xx_adc.c
> @@ -156,15 +156,13 @@ static int ep93xx_adc_probe(struct platform_device *pdev)
> struct iio_dev *iiodev;
> struct ep93xx_adc_priv *priv;
> struct clk *pclk;
> - struct resource *res;
>
> iiodev = devm_iio_device_alloc(&pdev->dev, sizeof(*priv));
> if (!iiodev)
> return -ENOMEM;
> priv = iio_priv(iiodev);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - priv->base = devm_ioremap_resource(&pdev->dev, res);
> + priv->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(priv->base))
> return PTR_ERR(priv->base);
>
prev parent reply other threads:[~2021-09-11 17:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-08 10:56 [PATCH] iio: ep93xx: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-11 17:16 ` 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=20210911181643.72d02489@jic23-huawei \
--to=jic23@kernel.org \
--cc=alexander.sverdlin@gmail.com \
--cc=caihuoqing@baidu.com \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox