[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c8b8f064-7887-9608-573c-525799641c6d@baylibre.com>
Date: Wed, 1 Sep 2021 10:14:53 +0200
From: Neil Armstrong <narmstrong@...libre.com>
To: Cai Huoqing <caihuoqing@...du.com>
Cc: Sean Young <sean@...s.org>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Kevin Hilman <khilman@...libre.com>,
Jerome Brunet <jbrunet@...libre.com>,
Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
linux-media@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-amlogic@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] media: rc: meson-ir: Make use of the helper function
devm_platform_ioremap_resource()
On 01/09/2021 07:54, Cai Huoqing 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@...du.com>
> ---
> drivers/media/rc/meson-ir.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/media/rc/meson-ir.c b/drivers/media/rc/meson-ir.c
> index dad55950dfc6..4b769111f78e 100644
> --- a/drivers/media/rc/meson-ir.c
> +++ b/drivers/media/rc/meson-ir.c
> @@ -102,7 +102,6 @@ static int meson_ir_probe(struct platform_device *pdev)
> {
> struct device *dev = &pdev->dev;
> struct device_node *node = dev->of_node;
> - struct resource *res;
> const char *map_name;
> struct meson_ir *ir;
> int irq, ret;
> @@ -111,8 +110,7 @@ static int meson_ir_probe(struct platform_device *pdev)
> if (!ir)
> return -ENOMEM;
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - ir->reg = devm_ioremap_resource(dev, res);
> + ir->reg = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(ir->reg))
> return PTR_ERR(ir->reg);
>
>
Reviewed-by: Neil Armstrong <narmstrong@...libre.com>
Powered by blists - more mailing lists