From e1670ef194977f233320e7cff2da73c6936f0171 Mon Sep 17 00:00:00 2001 From: Soomin Kim Date: Tue, 12 Jul 2016 17:25:19 +0900 Subject: [PATCH] [COMMON] thermal: samsung: Print error code Print error code when cooling device registration is failed. Change-Id: Iedc2d4b16188fa199ef42d24da07c53a25a6643b Signed-off-by: Soomin Kim --- drivers/thermal/samsung/exynos_tmu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 593d61927b68..8f74f26a2edd 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -1189,9 +1189,9 @@ static int exynos_cpufreq_cooling_register(struct exynos_tmu_data *data) ggchild = of_get_next_child(gchild, NULL); ret = of_parse_phandle_with_args(ggchild, "cooling-device", "#cooling-cells", 0, &cooling_spec); - if (ret < 0) { - pr_err("exynos_tmu do not get cooling spec \n"); - } + if (ret < 0) + pr_err("%s do not get cooling spec(err = %d) \n", data->tmu_name, ret); + cool_np = cooling_spec.np; for_each_possible_cpu(cpu) { @@ -1229,9 +1229,9 @@ static int exynos_gpufreq_cooling_register(struct exynos_tmu_data *data) ggchild = of_get_next_child(gchild, NULL); ret = of_parse_phandle_with_args(ggchild, "cooling-device", "#cooling-cells", 0, &cooling_spec); - if (ret < 0) { - pr_err("exynos_tmu do not get cooling spec \n"); - } + if (ret < 0) + pr_err("%s do not get cooling spec(err = %d) \n", data->tmu_name, ret); + cool_np = cooling_spec.np; data->cool_dev = of_gpufreq_cooling_register(cool_np, NULL); @@ -1266,9 +1266,9 @@ static int exynos_isp_cooling_register(struct exynos_tmu_data *data) ggchild = of_get_next_child(gchild, NULL); ret = of_parse_phandle_with_args(ggchild, "cooling-device", "#cooling-cells", 0, &cooling_spec); - if (ret < 0) { - pr_err("exynos_tmu do not get cooling spec \n"); - } + if (ret < 0) + pr_err("%s do not get cooling spec(err = %d) \n", data->tmu_name, ret); + cool_np = cooling_spec.np; data->cool_dev = of_isp_cooling_register(cool_np, NULL); -- 2.20.1