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

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>

authored by

Anson Huang and committed by
Shawn Guo
ccc1de31 32654dad

+1 -3
+1 -3
drivers/soc/imx/gpc.c
··· 406 406 const struct imx_gpc_dt_data *of_id_data = of_id->data; 407 407 struct device_node *pgc_node; 408 408 struct regmap *regmap; 409 - struct resource *res; 410 409 void __iomem *base; 411 410 int ret; 412 411 ··· 416 417 !pgc_node) 417 418 return 0; 418 419 419 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); 420 - base = devm_ioremap_resource(&pdev->dev, res); 420 + base = devm_platform_ioremap_resource(pdev, 0); 421 421 if (IS_ERR(base)) 422 422 return PTR_ERR(base); 423 423