summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/lpddr
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2023-07-07 06:06:19 +0200
committerMiquel Raynal <miquel.raynal@bootlin.com>2023-07-12 14:08:26 +0200
commita29f696aa96f94ced1655b183c9694920d8bbfe2 (patch)
tree10d31306e9c370cbcf5979dc9d3eab56471a3aea /drivers/mtd/lpddr
parentmtd: lantiq-flash: Use devm_platform_get_and_ioremap_resource() (diff)
downloadlinux-a29f696aa96f94ced1655b183c9694920d8bbfe2.tar.xz
linux-a29f696aa96f94ced1655b183c9694920d8bbfe2.zip
mtd: lpddr2_nvm: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code. Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Link: https://lore.kernel.org/linux-mtd/20230707040622.78174-15-frank.li@vivo.com
Diffstat (limited to 'drivers/mtd/lpddr')
-rw-r--r--drivers/mtd/lpddr/lpddr2_nvm.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/mtd/lpddr/lpddr2_nvm.c b/drivers/mtd/lpddr/lpddr2_nvm.c
index e71af4c49096..f4e5174b2449 100644
--- a/drivers/mtd/lpddr/lpddr2_nvm.c
+++ b/drivers/mtd/lpddr/lpddr2_nvm.c
@@ -412,7 +412,6 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)
struct map_info *map;
struct mtd_info *mtd;
struct resource *add_range;
- struct resource *control_regs;
struct pcm_int_data *pcm_data;
/* Allocate memory control_regs data structures */
@@ -452,8 +451,7 @@ static int lpddr2_nvm_probe(struct platform_device *pdev)
simple_map_init(map); /* fill with default methods */
- control_regs = platform_get_resource(pdev, IORESOURCE_MEM, 1);
- pcm_data->ctl_regs = devm_ioremap_resource(&pdev->dev, control_regs);
+ pcm_data->ctl_regs = devm_platform_ioremap_resource(pdev, 1);
if (IS_ERR(pcm_data->ctl_regs))
return PTR_ERR(pcm_data->ctl_regs);