[PATCH 6/6] drivers/thermal/ti-soc-thermal: Use devm_platform_get_and_ioremap_resource()

From: Yangtao Li
Date: Mon Jun 26 2023 - 08:44:36 EST


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: Yangtao Li <frank.li@xxxxxxxx>
---
drivers/thermal/ti-soc-thermal/ti-bandgap.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/thermal/ti-soc-thermal/ti-bandgap.c b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
index a1c9a1530183..0066b9150920 100644
--- a/drivers/thermal/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/thermal/ti-soc-thermal/ti-bandgap.c
@@ -847,10 +847,9 @@ static struct ti_bandgap *ti_bandgap_build(struct platform_device *pdev)
do {
void __iomem *chunk;

- res = platform_get_resource(pdev, IORESOURCE_MEM, i);
+ chunk = devm_platform_get_and_ioremap_resource(pdev, i, &res);
if (!res)
break;
- chunk = devm_ioremap_resource(&pdev->dev, res);
if (i == 0)
bgp->base = chunk;
if (IS_ERR(chunk))
--
2.39.0