Skip to content

Commit ccc1de3

Browse files
Anson-HuangShawn Guo
authored andcommitted
soc: imx: gpc: 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 32654da commit ccc1de3

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎drivers/soc/imx/gpc.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ static int imx_gpc_probe(struct platform_device *pdev)
406406
const struct imx_gpc_dt_data *of_id_data = of_id->data;
407407
struct device_node *pgc_node;
408408
struct regmap *regmap;
409-
struct resource *res;
410409
void __iomem *base;
411410
int ret;
412411

@@ -417,8 +416,7 @@ static int imx_gpc_probe(struct platform_device *pdev)
417416
!pgc_node)
418417
return 0;
419418

420-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
421-
base = devm_ioremap_resource(&pdev->dev, res);
419+
base = devm_platform_ioremap_resource(pdev, 0);
422420
if (IS_ERR(base))
423421
return PTR_ERR(base);
424422

0 commit comments

Comments
 (0)