Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Anson Huang and committed by
Shawn Guo
9f735c4e ccc1de31

+1 -3
+1 -3
drivers/soc/imx/gpcv2.c
··· 563 563 struct device *dev = &pdev->dev; 564 564 struct device_node *pgc_np, *np; 565 565 struct regmap *regmap; 566 - struct resource *res; 567 566 void __iomem *base; 568 567 int ret; 569 568 ··· 572 573 return -EINVAL; 573 574 } 574 575 575 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 576 - base = devm_ioremap_resource(dev, res); 576 + base = devm_platform_ioremap_resource(pdev, 0); 577 577 if (IS_ERR(base)) 578 578 return PTR_ERR(base); 579 579