diff options
author | Boris Ostrovsky <boris.ostrovsky@oracle.com> | 2016-12-15 16:00:58 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2016-12-21 02:52:52 +0100 |
commit | 2a8fa123d9a1d2ca391eefc81fea747108a5081f (patch) | |
tree | 3f8c8f9d337a5fa88828b923c3d457ad1b035750 /drivers/cpufreq/cris-etraxfs-cpufreq.c | |
parent | CPU/hotplug: Clarify description of __cpuhp_setup_state() return value (diff) | |
download | linux-2a8fa123d9a1d2ca391eefc81fea747108a5081f.tar.xz linux-2a8fa123d9a1d2ca391eefc81fea747108a5081f.zip |
cpufreq: Remove CPU hotplug callbacks only if they were initialized
Since CPU hotplug callbacks are requested for CPUHP_AP_ONLINE_DYN state,
successful callback initialization will result in cpuhp_setup_state()
returning a positive value. Therefore acpi_cpufreq_online being zero
indicates that callbacks have not been installed.
This means that acpi_cpufreq_boost_exit() should only remove them if
acpi_cpufreq_online is positive. Trying to call
cpuhp_remove_state_nocalls(0) will cause a BUG().
Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cris-etraxfs-cpufreq.c')
0 files changed, 0 insertions, 0 deletions