Re: [PATCH 3/9] memory: mvebu-devbus: convert to devm_platform_ioremap_resource
From: Gregory CLEMENT
Date: Wed Jan 08 2020 - 04:41:39 EST
Hi Yangtao Li,
> Use devm_platform_ioremap_resource() to simplify code.
>
> Signed-off-by: Yangtao Li <tiny.windzz@xxxxxxxxx>
Applied on mvebu/drivers
Thanks,
Gregory
> ---
> drivers/memory/mvebu-devbus.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/memory/mvebu-devbus.c b/drivers/memory/mvebu-devbus.c
> index 095f8a3b2cfc..886aea587276 100644
> --- a/drivers/memory/mvebu-devbus.c
> +++ b/drivers/memory/mvebu-devbus.c
> @@ -267,7 +267,6 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
> struct devbus_read_params r;
> struct devbus_write_params w;
> struct devbus *devbus;
> - struct resource *res;
> struct clk *clk;
> unsigned long rate;
> int err;
> @@ -277,8 +276,7 @@ static int mvebu_devbus_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> devbus->dev = dev;
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - devbus->base = devm_ioremap_resource(&pdev->dev, res);
> + devbus->base = devm_platform_ioremap_resource(pdev, 0);
> if (IS_ERR(devbus->base))
> return PTR_ERR(devbus->base);
>
> --
> 2.17.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com