From: Soomin Kim Date: Tue, 12 Jul 2016 08:35:25 +0000 (+0900) Subject: [COMMON] thermal: samsung: Use the id property X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b4d65c9653b52822e2e3013c9e2a336663b3b881;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 --- 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) {