Merge branch 'pm-cpufreq'

* pm-cpufreq:
  cpufreq: s3c64xx: remove incorrect __init annotation
  cpufreq: Remove CPU hotplug callbacks only if they were initialized
  CPU/hotplug: Clarify description of __cpuhp_setup_state() return value
This commit is contained in:
Rafael J. Wysocki 2016-12-22 14:34:55 +01:00
commit 7b99f1aeed
3 changed files with 7 additions and 3 deletions

View File

@ -930,7 +930,7 @@ static void __init acpi_cpufreq_boost_init(void)
static void acpi_cpufreq_boost_exit(void)
{
if (acpi_cpufreq_online >= 0)
if (acpi_cpufreq_online > 0)
cpuhp_remove_state_nocalls(acpi_cpufreq_online);
}

View File

@ -107,7 +107,7 @@ static int s3c64xx_cpufreq_set_target(struct cpufreq_policy *policy,
}
#ifdef CONFIG_REGULATOR
static void __init s3c64xx_cpufreq_config_regulator(void)
static void s3c64xx_cpufreq_config_regulator(void)
{
int count, v, i, found;
struct cpufreq_frequency_table *freq;

View File

@ -1586,7 +1586,11 @@ EXPORT_SYMBOL_GPL(__cpuhp_state_add_instance);
* @startup: startup callback function
* @teardown: teardown callback function
*
* Returns 0 if successful, otherwise a proper error code
* Returns:
* On success:
* Positive state number if @state is CPUHP_AP_ONLINE_DYN
* 0 for all other states
* On failure: proper (negative) error code
*/
int __cpuhp_setup_state(enum cpuhp_state state,
const char *name, bool invoke,