aboutsummaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2006-10-17 00:09:58 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-17 08:18:44 -0700
commit1fec74a9cda95772887c82ede5c0ac60f5be857e (patch)
treec3d0cc4270d37bff046668a0f437950c0788939c /drivers/acpi
parent286e1ea3ac1ca4f503ebbb3020bdb0cbe6adffac (diff)
[PATCH] acpi_processor_latency_notifier(): UP warning fix
drivers/acpi/processor_idle.c:1112: warning: 'smp_callback' defined but not used Cc: Len Brown <lenb@kernel.org> Cc: Arjan van de Ven <arjan@infradead.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/processor_idle.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 526387dc379..e67144cf3c8 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -1108,6 +1108,7 @@ static const struct file_operations acpi_processor_power_fops = {
.release = single_release,
};
+#ifdef CONFIG_SMP
static void smp_callback(void *v)
{
/* we already woke the CPU up, nothing more to do */
@@ -1129,6 +1130,7 @@ static int acpi_processor_latency_notify(struct notifier_block *b,
static struct notifier_block acpi_processor_latency_notifier = {
.notifier_call = acpi_processor_latency_notify,
};
+#endif
int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
struct acpi_device *device)
@@ -1146,7 +1148,9 @@ int __cpuinit acpi_processor_power_init(struct acpi_processor *pr,
"ACPI: processor limited to max C-state %d\n",
max_cstate);
first_run++;
+#ifdef CONFIG_SMP
register_latency_notifier(&acpi_processor_latency_notifier);
+#endif
}
if (!pr)
@@ -1218,7 +1222,9 @@ int acpi_processor_power_exit(struct acpi_processor *pr,
* copies of pm_idle before proceeding.
*/
cpu_idle_wait();
+#ifdef CONFIG_SMP
unregister_latency_notifier(&acpi_processor_latency_notifier);
+#endif
}
return 0;