diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2023-01-18 11:37:47 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2023-01-19 00:21:35 +0300 |
commit | f7f6d3713282a272bd2b0fd2ad85ca320f6822b4 (patch) | |
tree | c26ab22ca44c96ac702354d8d907d37d4984ab6b | |
parent | 9b22743b93d50a346f437fa96dfec399f35d4965 (diff) | |
download | linux-f7f6d3713282a272bd2b0fd2ad85ca320f6822b4.tar.xz |
thermal/drivers/mtk_thermal: 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: ye xingchen <ye.xingchen@zte.com.cn>
Link: https://lore.kernel.org/r/202301181637472073620@zte.com.cn
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-rw-r--r-- | drivers/thermal/mtk_thermal.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c index 0084b76493d9..9a8b107900e9 100644 --- a/drivers/thermal/mtk_thermal.c +++ b/drivers/thermal/mtk_thermal.c @@ -990,7 +990,6 @@ static int mtk_thermal_probe(struct platform_device *pdev) int ret, i, ctrl_id; struct device_node *auxadc, *apmixedsys, *np = pdev->dev.of_node; struct mtk_thermal *mt; - struct resource *res; u64 auxadc_phys_base, apmixed_phys_base; struct thermal_zone_device *tzdev; void __iomem *apmixed_base, *auxadc_base; @@ -1009,8 +1008,7 @@ static int mtk_thermal_probe(struct platform_device *pdev) if (IS_ERR(mt->clk_auxadc)) return PTR_ERR(mt->clk_auxadc); - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - mt->thermal_base = devm_ioremap_resource(&pdev->dev, res); + mt->thermal_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL); if (IS_ERR(mt->thermal_base)) return PTR_ERR(mt->thermal_base); |