summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/raw/gpio.c
diff options
context:
space:
mode:
authorCai Huoqing <caihuoqing@baidu.com>2021-09-01 09:41:22 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2021-09-14 19:34:37 +0200
commit557de1cfabd6ea5476e5364a00d23d26bdfa3d4d (patch)
treeaabf016c3deee05b1386d4c57c5a4d217a0203bf /drivers/mtd/nand/raw/gpio.c
parentmtd: rawnand: denali: Make use of the helper function devm_platform_ioremap_r... (diff)
downloadlinux-557de1cfabd6ea5476e5364a00d23d26bdfa3d4d.tar.xz
linux-557de1cfabd6ea5476e5364a00d23d26bdfa3d4d.zip
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 <caihuoqing@baidu.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20210901074123.9033-1-caihuoqing@baidu.com
Diffstat (limited to 'drivers/mtd/nand/raw/gpio.c')
-rw-r--r--drivers/mtd/nand/raw/gpio.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/gpio.c b/drivers/mtd/nand/raw/gpio.c
index fb7a086de35e..8901c4aa0c21 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);