aboutsummaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorGravatar ye xingchen <ye.xingchen@zte.com.cn> 2023-01-18 16:37:47 +0800
committerGravatar Daniel Lezcano <daniel.lezcano@linaro.org> 2023-01-18 22:21:35 +0100
commitf7f6d3713282a272bd2b0fd2ad85ca320f6822b4 (patch)
treec26ab22ca44c96ac702354d8d907d37d4984ab6b /drivers/thermal
parentthermal/drivers/armada: Use devm_platform_get_and_ioremap_resource() (diff)
downloadlinux-f7f6d3713282a272bd2b0fd2ad85ca320f6822b4.tar.gz
linux-f7f6d3713282a272bd2b0fd2ad85ca320f6822b4.tar.bz2
linux-f7f6d3713282a272bd2b0fd2ad85ca320f6822b4.zip
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>
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/mtk_thermal.c4
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);