Browse Source

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
Rafael J. Wysocki 8 years ago
parent
commit
7b99f1aeed
3 changed files with 7 additions and 3 deletions
  1. 1 1
      drivers/cpufreq/acpi-cpufreq.c
  2. 1 1
      drivers/cpufreq/s3c64xx-cpufreq.c
  3. 5 1
      kernel/cpu.c

+ 1 - 1
drivers/cpufreq/acpi-cpufreq.c

@@ -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);
 }
 

+ 1 - 1
drivers/cpufreq/s3c64xx-cpufreq.c

@@ -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;

+ 5 - 1
kernel/cpu.c

@@ -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,