From: Cai Huoqing Date: Wed, 1 Sep 2021 07:41:22 +0000 (+0800) Subject: mtd: rawnand: gpio: Make use of the helper function devm_platform_ioremap_resource() X-Git-Tag: v5.16-rc1~89^2~1^2~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=557de1cfabd6ea5476e5364a00d23d26bdfa3d4d;p=thirdparty%2Fkernel%2Flinux.git mtd: rawnand: gpio: Make use of the helper function devm_platform_ioremap_resource() Use the devm_platform_ioremap_resource() helper instead of calling platform_get_resource() and devm_ioremap_resource() separately Signed-off-by: Cai Huoqing Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20210901074123.9033-1-caihuoqing@baidu.com --- diff --git a/drivers/mtd/nand/raw/gpio.c b/drivers/mtd/nand/raw/gpio.c index fb7a086de35e5..8901c4aa0c21a 100644 --- a/drivers/mtd/nand/raw/gpio.c +++ b/drivers/mtd/nand/raw/gpio.c @@ -303,8 +303,7 @@ static int gpio_nand_probe(struct platform_device *pdev) chip = &gpiomtd->nand_chip; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - gpiomtd->io = devm_ioremap_resource(dev, res); + gpiomtd->io = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(gpiomtd->io)) return PTR_ERR(gpiomtd->io);