]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: stats: create sysfs entries when cpufreq_stats is a module
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 7 Jan 2014 01:40:13 +0000 (07:10 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Fri, 17 Jan 2014 01:00:44 +0000 (02:00 +0100)
commit2c9b60c5c3aa302b1e814336a37a200e411ea942
treeafd842df87af91dd21e2626f7215e01b7c902fd1
parentfeb77ad545a2cda4a9f62553dec14510e347c752
cpufreq: stats: create sysfs entries when cpufreq_stats is a module

When cpufreq_stats is compiled in as a module, cpufreq driver would
have already been registered. And so the CPUFREQ_CREATE_POLICY
notifiers wouldn't be called for it. Hence no sysfs entries for stats. :(

This patch calls cpufreq_stats_create_table() for each online CPU from
cpufreq_stats_init() and so if policy is already created for CPUx then
we will register sysfs stats for it.

When its not compiled as module, we will return early as policy wouldn't
be found for any of the CPUs.

Acked-by: Nicolas Pitre <nico@linaro.org>
Tested-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq_stats.c