Skip to contentSkip to conversation

clk: imx8mq: Use devm_platform_ioremap_resource() instead of of_iomap()

PATCH Applied [email protected] 2 participants 2 messages Jun 10, 2019 – Jun 18, 2019

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 clk: imx8mq: Use devm_platform_ioremap_resource() instead of of_iomap()

From: Anson Huang <[email protected]>

i.MX8MQ clock driver uses platform driver model, better to use devm_platform_ioremap_resource() instead of of_iomap() to get IO base.

---
 drivers/clk/imx/clk-imx8mq.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/clk/imx/clk-imx8mq.c +3 -3
index 1292241..7da1edb 100644
@@ -361,9 +361,9 @@ static int imx8mq_clocks_probe(struct platform_device *pdev)
 	clks[IMX8MQ_SYS2_PLL_1000M] = imx_clk_fixed_factor("sys2_pll_1000m", "sys2_pll_out", 1, 1);
 
 	np = dev->of_node;
-	base = of_iomap(np, 0);
-	if (WARN_ON(!base))
-		return -ENOMEM;
+	base = devm_platform_ioremap_resource(pdev, 0);
+	if (WARN_ON(IS_ERR(base)))
+		return PTR_ERR(base);
 
 	/* CORE */
 	clks[IMX8MQ_CLK_A53_SRC] = imx_clk_mux2("arm_a53_src", base + 0x8000, 24, 3, imx8mq_a53_sels, ARRAY_SIZE(imx8mq_a53_sels));
Signature · 1 line
2.7.4