Skip to content

Commit

Permalink
cpufreq: Do not track governor name for scaling drivers with internal…
Browse files Browse the repository at this point in the history
… 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>
  • Loading branch information
Dirk Brandewie authored and Rafael J. Wysocki committed Feb 9, 2013
1 parent f6b0515 commit fa69e33
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/cpufreq/cpufreq.c
Original file line number Diff line number Diff line change
Expand Up @@ -1025,8 +1025,9 @@ static int __cpufreq_remove_dev(struct device *dev, struct subsys_interface *sif
__cpufreq_governor(data, CPUFREQ_GOV_STOP);

#ifdef CONFIG_HOTPLUG_CPU
strncpy(per_cpu(cpufreq_cpu_governor, cpu), data->governor->name,
CPUFREQ_NAME_LEN);
if (!cpufreq_driver->setpolicy)
strncpy(per_cpu(cpufreq_cpu_governor, cpu),
data->governor->name, CPUFREQ_NAME_LEN);
#endif

WARN_ON(lock_policy_rwsem_write(cpu));
Expand Down

0 comments on commit fa69e33

Please sign in to comment.