aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq
diff options
context:
space:
mode:
authorDirk Brandewie <dirk.brandewie@gmail.com>2013-02-06 12:02:11 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-09 06:55:53 -0500
commitfa69e33f7d38e658583ff910642da7ea4515ad74 (patch)
tree6fc7e05604cb6fda2e0f9c6da361d761ec362a46 /drivers/cpufreq
parentf6b0515b078f641d00ca531a9f0ae34f3b05ec20 (diff)
cpufreq: Do not track governor name for scaling drivers with internal governors.
Scaling drivers that implement internal governors do not have governor structures assocaited with them. Only track the name of the governor associated with the CPU if the driver does not implement cpufreq_driver.setpolicy() Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r--drivers/cpufreq/cpufreq.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index 480c49c71afe..94117a7f219b 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1025,8 +1025,9 @@ static int __cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif
1025 __cpufreq_governor(data, CPUFREQ_GOV_STOP); 1025 __cpufreq_governor(data, CPUFREQ_GOV_STOP);
1026 1026
1027#ifdef CONFIG_HOTPLUG_CPU 1027#ifdef CONFIG_HOTPLUG_CPU
1028 strncpy(per_cpu(cpufreq_cpu_governor, cpu), data->governor->name, 1028 if (!cpufreq_driver->setpolicy)
1029 CPUFREQ_NAME_LEN); 1029 strncpy(per_cpu(cpufreq_cpu_governor, cpu),
1030 data->governor->name, CPUFREQ_NAME_LEN);
1030#endif 1031#endif
1031 1032
1032 WARN_ON(lock_policy_rwsem_write(cpu)); 1033 WARN_ON(lock_policy_rwsem_write(cpu));