Skip to content

Commit f7f6d37

Browse files
ye xingchendlezcano
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Daniel Lezcano <[email protected]>
1 parent 9b22743 commit f7f6d37

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/thermal/mtk_thermal.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,6 @@ static int mtk_thermal_probe(struct platform_device *pdev)
990990
int ret, i, ctrl_id;
991991
struct device_node *auxadc, *apmixedsys, *np = pdev->dev.of_node;
992992
struct mtk_thermal *mt;
993-
struct resource *res;
994993
u64 auxadc_phys_base, apmixed_phys_base;
995994
struct thermal_zone_device *tzdev;
996995
void __iomem *apmixed_base, *auxadc_base;
@@ -1009,8 +1008,7 @@ static int mtk_thermal_probe(struct platform_device *pdev)
10091008
if (IS_ERR(mt->clk_auxadc))
10101009
return PTR_ERR(mt->clk_auxadc);
10111010

1012-
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1013-
mt->thermal_base = devm_ioremap_resource(&pdev->dev, res);
1011+
mt->thermal_base = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
10141012
if (IS_ERR(mt->thermal_base))
10151013
return PTR_ERR(mt->thermal_base);
10161014

0 commit comments

Comments
 (0)