Skip to content

Commit 9f735c4

Browse files
Anson-HuangShawn Guo
authored andcommitted
soc: imx: gpcv2: use devm_platform_ioremap_resource() to simplify code
Use the new helper devm_platform_ioremap_resource() which wraps the platform_get_resource() and devm_ioremap_resource() together, to simplify the code. Signed-off-by: Anson Huang <Anson.Huang@nxp.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Shawn Guo <shawnguo@kernel.org>
1 parent ccc1de3 commit 9f735c4

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/soc/imx/gpcv2.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,6 @@ static int imx_gpcv2_probe(struct platform_device *pdev)
563563
struct device *dev = &pdev->dev;
564564
struct device_node *pgc_np, *np;
565565
struct regmap *regmap;
566-
struct resource *res;
567566
void __iomem *base;
568567
int ret;
569568

@@ -573,8 +572,7 @@ static int imx_gpcv2_probe(struct platform_device *pdev)
573572
return -EINVAL;
574573
}
575574

576-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
577-
base = devm_ioremap_resource(dev, res);
575+
base = devm_platform_ioremap_resource(pdev, 0);
578576
if (IS_ERR(base))
579577
return PTR_ERR(base);
580578

0 commit comments

Comments
 (0)