[PATCH] thermal/samsung: Use platform_get_irq() in exynos_tmu

Rosen Penev rosenp at gmail.com
Tue Jun 2 17:56:08 PDT 2026


Replace deprecated irq_of_parse_and_map() with platform_get_irq() for IRQ
retrieval in exynos_tmu, and change error handling to propagate the error
code directly. This improves maintainability and aligns with standard
driver practices. irq_of_parse_and_map() requires irq_dispose_mapping(),
which is missing.

Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 47a99b3c5395..ff81b81b4532 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -846,10 +846,10 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 	if (!data || !pdev->dev.of_node)
 		return -ENODEV;
 
-	data->irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
-	if (data->irq <= 0) {
+	data->irq = platform_get_irq(pdev, 0);
+	if (data->irq < 0) {
 		dev_err(&pdev->dev, "failed to get IRQ\n");
-		return -ENODEV;
+		return data->irq;
 	}
 
 	if (of_address_to_resource(pdev->dev.of_node, 0, &res)) {
-- 
2.54.0




More information about the linux-arm-kernel mailing list