* [PATCH] thermal/drivers/mtk_thermal: Use devm_platform_get_and_ioremap_resource()
@ 2023-01-18 8:37 ` ye.xingchen
0 siblings, 0 replies; 4+ messages in thread
From: ye.xingchen @ 2023-01-18 8:37 UTC (permalink / raw)
To: daniel.lezcano
Cc: rafael, amitk, rui.zhang, matthias.bgg, linux-pm,
linux-arm-kernel, linux-mediatek, linux-kernel
From: ye xingchen <ye.xingchen@zte.com.cn>
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>
---
drivers/thermal/mtk_thermal.c | 4 +---
1 file changed, 1 insertion(+), 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);
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] thermal/drivers/mtk_thermal: Use devm_platform_get_and_ioremap_resource()
@ 2023-01-18 8:37 ` ye.xingchen
0 siblings, 0 replies; 4+ messages in thread
From: ye.xingchen @ 2023-01-18 8:37 UTC (permalink / raw)
To: daniel.lezcano
Cc: rafael, amitk, rui.zhang, matthias.bgg, linux-pm,
linux-arm-kernel, linux-mediatek, linux-kernel
From: ye xingchen <ye.xingchen@zte.com.cn>
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>
---
drivers/thermal/mtk_thermal.c | 4 +---
1 file changed, 1 insertion(+), 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);
--
2.25.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] thermal/drivers/mtk_thermal: Use devm_platform_get_and_ioremap_resource()
2023-01-18 8:37 ` ye.xingchen
@ 2023-01-18 21:24 ` Daniel Lezcano
-1 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2023-01-18 21:24 UTC (permalink / raw)
To: ye.xingchen
Cc: rafael, amitk, rui.zhang, matthias.bgg, linux-pm,
linux-arm-kernel, linux-mediatek, linux-kernel
On 18/01/2023 09:37, ye.xingchen@zte.com.cn wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> 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>
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] thermal/drivers/mtk_thermal: Use devm_platform_get_and_ioremap_resource()
@ 2023-01-18 21:24 ` Daniel Lezcano
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2023-01-18 21:24 UTC (permalink / raw)
To: ye.xingchen
Cc: rafael, amitk, rui.zhang, matthias.bgg, linux-pm,
linux-arm-kernel, linux-mediatek, linux-kernel
On 18/01/2023 09:37, ye.xingchen@zte.com.cn wrote:
> From: ye xingchen <ye.xingchen@zte.com.cn>
>
> 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>
> ---
Applied, thanks
--
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs
Follow Linaro: <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-01-18 21:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-18 8:37 [PATCH] thermal/drivers/mtk_thermal: Use devm_platform_get_and_ioremap_resource() ye.xingchen
2023-01-18 8:37 ` ye.xingchen
2023-01-18 21:24 ` Daniel Lezcano
2023-01-18 21:24 ` Daniel Lezcano
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.