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:Junjie Wu <junjiew@codeaurora.org>
Loading
Please register or sign in to comment