thermal: Add check cpufreq table code.
authorPark Chungwoo <cww.park@samsung.com>
Sun, 21 Feb 2016 00:06:28 +0000 (09:06 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:09:13 +0000 (17:09 +0900)
This patch added check cpufreq table.
Thermal driver must be registered after the registration of cpufreq.

Change-Id: I36732df36c0afe8d74529816ee4ebec7df5bd23c
Signed-off-by: Park Chungwoo <cww.park@samsung.com>
drivers/thermal/samsung/exynos_tmu.c

index b24860fd4a428fa62e3c1452b28754a943da0184..d1daf319622142fa80146ef332d1ac33aa79ae02 100644 (file)
@@ -33,6 +33,7 @@
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/platform_device.h>
+#include <linux/cpufreq.h>
 
 #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)