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

Skip to content
Commit f30be559 authored by Junjie Wu's avatar Junjie Wu
Browse files

cpufreq: Call cpufreq_update_policy() during cpufreq_stats_init()



Commit da12b948 (cpufreq: Fix misplaced call to cpufreq_update_policy())
removed cpufreq_update_policy() that was in cpufreq_stats_init(). The fix
of moving cpufreq_update_policy() in hotplug notifier is still valid.

However, by removing the call in cpufreq_stats_init(), it misses a
corner case where cpufreq_stats register last and no hotplug or
cpufreq change happens afterwards. Then a CPUFREQ_NOTIFY will never
be sent to cpufreq_stats hotplug notifier, and sysfs won't be created.

Put back the cpufreq_update_policy() call after registering for hotplug
notifier in cpufreq_stats_init(). The call will force a CPUFREQ_NOTIFY
notification to be sent and sysfs to be created. In case cpufreq
driver is not registered, it will just fail silently.

Change-Id: I6d792d0ba600a7d8c70ccb2adae1e2cbadc0463e
Signed-off-by: default avatarJunjie Wu <junjiew@codeaurora.org>
parent fd2e1ed4
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