Skip to content

Commit 60b8b1d

Browse files
awhitcrofttorvalds
authored andcommitted
x86 idle: APM requires pm_idle/default_idle unconditionally when a module
[ Also from Ben Hutchings <ben@decadent.org.uk> and Vitaliy Ivanov <vitalivanov@gmail.com> ] Commit 06ae40c ("x86 idle: EXPORT_SYMBOL(default_idle, pm_idle) only when APM demands it") removed the export for pm_idle/default_idle unless the apm module was modularised and CONFIG_APM_CPU_IDLE was set. But the apm module uses pm_idle/default_idle unconditionally, CONFIG_APM_CPU_IDLE only affects the bios idle threshold. Adjust the export accordingly. [ Used #ifdef instead of #if defined() as it's shorter, and what both Ben and Vitaliy used.. Andy, you're out-voted ;) - Linus ] Reported-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Acked-by: Ingo Molnar <mingo@elte.hu> Acked-by: Len Brown <len.brown@intel.com> Signed-off-by: Andy Whitcroft <apw@canonical.com> Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com> Signed-off-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 3a2289a commit 60b8b1d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎arch/x86/kernel/process.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ EXPORT_SYMBOL(boot_option_idle_override);
337337
* Powermanagement idle function, if any..
338338
*/
339339
void (*pm_idle)(void);
340-
#if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE)
340+
#ifdef CONFIG_APM_MODULE
341341
EXPORT_SYMBOL(pm_idle);
342342
#endif
343343

@@ -399,7 +399,7 @@ void default_idle(void)
399399
cpu_relax();
400400
}
401401
}
402-
#if defined(CONFIG_APM_MODULE) && defined(CONFIG_APM_CPU_IDLE)
402+
#ifdef CONFIG_APM_MODULE
403403
EXPORT_SYMBOL(default_idle);
404404
#endif
405405

0 commit comments

Comments
 (0)