cpufreq: exynos: call cpufreq_frequency_table_put_attr()
authorViresh Kumar <viresh.kumar@linaro.org>
Mon, 16 Sep 2013 13:26:44 +0000 (18:56 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 30 Sep 2013 18:18:45 +0000 (20:18 +0200)
Drivers which have an exit path must call cpufreq_frequency_table_put_attr() if
they have called cpufreq_frequency_table_get_attr() in their init path.

This driver was missing this part and is fixed with this patch.

Acked-by: Amit Daniel Kachhap <amit.daniel@samsung.com>
Acked-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/exynos5440-cpufreq.c

index b62967148c80054b09b3de464a99d8302435da24..24df155f871ed6c084ee26309becfe6857f562b4 100644 (file)
@@ -339,12 +339,19 @@ static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
        return 0;
 }
 
+static int exynos_cpufreq_cpu_exit(struct cpufreq_policy *policy)
+{
+       cpufreq_frequency_table_put_attr(policy->cpu);
+       return 0;
+}
+
 static struct cpufreq_driver exynos_driver = {
        .flags          = CPUFREQ_STICKY,
        .verify         = exynos_verify_speed,
        .target         = exynos_target,
        .get            = exynos_getspeed,
        .init           = exynos_cpufreq_cpu_init,
+       .exit           = exynos_cpufreq_cpu_exit,
        .name           = CPUFREQ_NAME,
 };