From 2fadfd1a2248847d53b714b5d1b6be073a5453f4 Mon Sep 17 00:00:00 2001 From: Park Chungwoo Date: Sun, 21 Feb 2016 09:06:28 +0900 Subject: [PATCH] thermal: Add check cpufreq table code. This patch added check cpufreq table. Thermal driver must be registered after the registration of cpufreq. Change-Id: I36732df36c0afe8d74529816ee4ebec7df5bd23c Signed-off-by: Park Chungwoo --- drivers/thermal/samsung/exynos_tmu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index b24860fd4a42..d1daf3196221 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -33,6 +33,7 @@ #include #include #include +#include #include "exynos_tmu.h" #include "../thermal_core.h" @@ -674,6 +675,9 @@ static int exynos_tmu_probe(struct platform_device *pdev) struct exynos_tmu_data *data; int ret; + if (!cpufreq_frequency_get_table(0)) + return -EPROBE_DEFER; + data = devm_kzalloc(&pdev->dev, sizeof(struct exynos_tmu_data), GFP_KERNEL); if (!data) -- 2.20.1