diff options
author | Cai Huoqing <caihuoqing@baidu.com> | 2021-09-01 09:41:22 +0200 |
---|---|---|
committer | Miquel Raynal <miquel.raynal@bootlin.com> | 2021-09-14 19:34:37 +0200 |
commit | 557de1cfabd6ea5476e5364a00d23d26bdfa3d4d (patch) | |
tree | aabf016c3deee05b1386d4c57c5a4d217a0203bf /drivers/mtd/nand/raw/gpio.c | |
parent | mtd: rawnand: denali: Make use of the helper function devm_platform_ioremap_r... (diff) | |
download | linux-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.c | 3 |
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); |