summaryrefslogtreecommitdiff
path: root/drivers/mtd/nand
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-07 12:06:05 +0800
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-07-12 14:07:42 +0200
commit81a16e154cc03e3ec76537694ab4afb8df3965eb (patch)
treeabbdd48de444fefa8cb0b7260dbac4049216e2eb /drivers/mtd/nand
parent60177390fa061c62d156f4a546e3efd90df3c183 (diff)
downloadlwn-81a16e154cc03e3ec76537694ab4afb8df3965eb.tar.gz
lwn-81a16e154cc03e3ec76537694ab4afb8df3965eb.zip
mtd: rawnand: sunxi: 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 <frank.li@vivo.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230707040622.78174-1-frank.li@vivo.com
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r--drivers/mtd/nand/raw/sunxi_nand.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/mtd/nand/raw/sunxi_nand.c b/drivers/mtd/nand/raw/sunxi_nand.c
index 9884304634f6..db36bd755b8d 100644
--- a/drivers/mtd/nand/raw/sunxi_nand.c
+++ b/drivers/mtd/nand/raw/sunxi_nand.c
@@ -2087,8 +2087,7 @@ static int sunxi_nfc_probe(struct platform_device *pdev)
nand_controller_init(&nfc->controller);
INIT_LIST_HEAD(&nfc->chips);
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- nfc->regs = devm_ioremap_resource(dev, r);
+ nfc->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &r);
if (IS_ERR(nfc->regs))
return PTR_ERR(nfc->regs);