From b4d65c9653b52822e2e3013c9e2a336663b3b881 Mon Sep 17 00:00:00 2001 From: Soomin Kim Date: Tue, 12 Jul 2016 17:35:25 +0900 Subject: [PATCH] [COMMON] thermal: samsung: Use the id property Currently, thermal node number is defined as alias and the number is generated sequentially. If some node aren't used the number is not machted with driver. So, id is defined explicitly. Change-Id: I7852bef35b359feb40223394d028237b40ac0349 Signed-off-by: Soomin Kim --- drivers/thermal/samsung/exynos_tmu.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 8f74f26a2edd..214ab07aae35 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -944,9 +944,10 @@ static int exynos_map_dt_data(struct platform_device *pdev) data->np = pdev->dev.of_node; - data->id = of_alias_get_id(pdev->dev.of_node, "tmuctrl"); - if (data->id < 0) - data->id = 0; + if (of_property_read_u32(pdev->dev.of_node, "id", &data->id)) { + dev_err(&pdev->dev, "failed to get TMU ID\n"); + return -ENODEV; + } data->irq = irq_of_parse_and_map(pdev->dev.of_node, 0); if (data->irq <= 0) { -- 2.20.1