提交 9b22743b 编写于 作者: Y ye xingchen 提交者: Daniel Lezcano

thermal/drivers/armada: Use devm_platform_get_and_ioremap_resource()

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.
Signed-off-by: Nye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202301181634379503534@zte.com.cnSigned-off-by: NDaniel Lezcano <daniel.lezcano@linaro.org>
上级 b5d6ec4d
...@@ -709,12 +709,10 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev, ...@@ -709,12 +709,10 @@ static int armada_thermal_probe_legacy(struct platform_device *pdev,
struct armada_thermal_priv *priv) struct armada_thermal_priv *priv)
{ {
struct armada_thermal_data *data = priv->data; struct armada_thermal_data *data = priv->data;
struct resource *res;
void __iomem *base; void __iomem *base;
/* First memory region points towards the status register */ /* First memory region points towards the status register */
res = platform_get_resource(pdev, IORESOURCE_MEM, 0); base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
base = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(base)) if (IS_ERR(base))
return PTR_ERR(base); return PTR_ERR(base);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册