Skip to contentSkip to conversation

thermal/samsung: Use platform_get_irq() in exynos_tmu

PATCH New Rosen Penev 1 participant 1 message Jun 3

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 thermal/samsung: Use platform_get_irq() in exynos_tmu

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
---
 drivers/thermal/samsung/exynos_tmu.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/thermal/samsung/exynos_tmu.c +3 -3
index 47a99b3c5395..ff81b81b4532 100644
@@ -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)) {
Signature · 1 line
2.54.0