aaed9d7e90c34cdfaf6eb1030b2f078ea4a15116
[openwrt/staging/neocturne.git] /
1 From 255509232417ee71fd606cb957d44cf6544f0c43 Mon Sep 17 00:00:00 2001
2 From: ye xingchen <ye.xingchen@zte.com.cn>
3 Date: Wed, 18 Jan 2023 16:37:47 +0800
4 Subject: [PATCH 02/42] thermal/drivers/mtk_thermal: Use
5 devm_platform_get_and_ioremap_resource()
6
7 Convert platform_get_resource(), devm_ioremap_resource() to a single
8 call to devm_platform_get_and_ioremap_resource(), as this is exactly
9 what this function does.
10
11 Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
12 Link: https://lore.kernel.org/r/202301181637472073620@zte.com.cn
13 Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
14 ---
15 drivers/thermal/mtk_thermal.c | 4 +---
16 1 file changed, 1 insertion(+), 3 deletions(-)
17
18 --- a/drivers/thermal/mtk_thermal.c
19 +++ b/drivers/thermal/mtk_thermal.c
20 @@ -990,7 +990,6 @@ static int mtk_thermal_probe(struct plat
21 int ret, i, ctrl_id;
22 struct device_node *auxadc, *apmixedsys, *np = pdev->dev.of_node;
23 struct mtk_thermal *mt;
24 - struct resource *res;
25 u64 auxadc_phys_base, apmixed_phys_base;
26 struct thermal_zone_device *tzdev;
27 void __iomem *apmixed_base, *auxadc_base;
28 @@ -1009,8 +1008,7 @@ static int mtk_thermal_probe(struct plat
29 if (IS_ERR(mt->clk_auxadc))
30 return PTR_ERR(mt->clk_auxadc);
31
32 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
33 - mt->thermal_base = devm_ioremap_resource(&pdev->dev, res);
34 + mt->thermal_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
35 if (IS_ERR(mt->thermal_base))
36 return PTR_ERR(mt->thermal_base);
37