mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/6] drivers/thermal/k3: Convert to devm_platform_ioremap_resource()
@ 2023-06-26 12:43 Yangtao Li
  2023-06-26 12:43 ` [PATCH 2/6] thermal/drivers/k3_j72xx_bandgap: " Yangtao Li
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Yangtao Li @ 2023-06-26 12:43 UTC (permalink / raw)
  To: Rafael J. Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui
  Cc: Yangtao Li, linux-pm, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/thermal/k3_bandgap.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/thermal/k3_bandgap.c b/drivers/thermal/k3_bandgap.c
index 1c3e590157ec..dadb5d070455 100644
--- a/drivers/thermal/k3_bandgap.c
+++ b/drivers/thermal/k3_bandgap.c
@@ -160,7 +160,6 @@ static const struct of_device_id of_k3_bandgap_match[];
 static int k3_bandgap_probe(struct platform_device *pdev)
 {
 	int ret = 0, cnt, val, id;
-	struct resource *res;
 	struct device *dev = &pdev->dev;
 	struct k3_bandgap *bgp;
 	struct k3_thermal_data *data;
@@ -173,8 +172,7 @@ static int k3_bandgap_probe(struct platform_device *pdev)
 	if (!bgp)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	bgp->base = devm_ioremap_resource(dev, res);
+	bgp->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(bgp->base))
 		return PTR_ERR(bgp->base);
 
-- 
2.39.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2023-06-27  7:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-26 12:43 [PATCH 1/6] drivers/thermal/k3: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-06-26 12:43 ` [PATCH 2/6] thermal/drivers/k3_j72xx_bandgap: " Yangtao Li
2023-06-26 12:43 ` [PATCH 3/6] thermal/drivers/qcom: " Yangtao Li
2023-06-26 12:43 ` [PATCH 4/6] drivers/thermal/rcar_gen3_thermal: " Yangtao Li
2023-06-26 16:28   ` Niklas Söderlund
2023-06-27  2:58     ` Yangtao Li
2023-06-27  7:47       ` Niklas Söderlund
2023-06-26 12:43 ` [PATCH 5/6] thermal/drivers/rcar: " Yangtao Li
2023-06-26 16:32   ` Niklas Söderlund
2023-06-26 12:43 ` [PATCH 6/6] drivers/thermal/ti-soc-thermal: Use devm_platform_get_and_ioremap_resource() Yangtao Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®