Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5d4eda83 authored by Viresh Kumar's avatar Viresh Kumar Committed by Junjie Wu
Browse files

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.

Change-Id: Ie8841c8a9c06b61231afd3f5377b73be24473527
Acked-by: default avatarNicolas Pitre <nico@linaro.org>
Tested-by: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Git-commit: b3f9ff88db6e149086dc111e5652106005fd5923
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent 4fa43899
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment