From: Yangtao Li Date: Fri, 7 Jul 2023 04:06:08 +0000 (+0800) Subject: mtd: rawnand: sh_flctl: Use devm_platform_get_and_ioremap_resource() X-Git-Tag: v6.6-rc1~75^2^2~53 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4eef841d29fac5fc8500668d1498a1ab8f9a91ce;p=thirdparty%2Fkernel%2Flinux.git mtd: rawnand: sh_flctl: Use devm_platform_get_and_ioremap_resource() Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Signed-off-by: Yangtao Li Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20230707040622.78174-4-frank.li@vivo.com --- diff --git a/drivers/mtd/nand/raw/sh_flctl.c b/drivers/mtd/nand/raw/sh_flctl.c index 63bf20c417197..db243b54c953e 100644 --- a/drivers/mtd/nand/raw/sh_flctl.c +++ b/drivers/mtd/nand/raw/sh_flctl.c @@ -1124,8 +1124,7 @@ static int flctl_probe(struct platform_device *pdev) if (!flctl) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - flctl->reg = devm_ioremap_resource(&pdev->dev, res); + flctl->reg = devm_platform_get_and_ioremap_resource(pdev, 0, &res); if (IS_ERR(flctl->reg)) return PTR_ERR(flctl->reg); flctl->fifo = res->start + 0x24; /* FLDTFIFO */