2010-06-16 01:12:13

by KOSAKI Motohiro

[permalink] [raw]
Subject: [PATCH] acpi: fix unused function warning

Len, Is this known issue?


=========================================================
When CONFIG_ACPI_PROCFS=n, processor_idle.c makes following warning.

drivers/acpi/processor_idle.c:83: warning: 'us_to_pm_timer_ticks'
defined but not used.

This patch fixes it.

Cc: Venkatesh Pallipadi <[email protected]>
Cc: Len Brown <[email protected]>
Signed-off-by: KOSAKI Motohiro <[email protected]>
---
drivers/acpi/processor_idle.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
index 0e562d0..3c36769 100644
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -80,10 +80,13 @@ module_param(nocst, uint, 0000);
static unsigned int latency_factor __read_mostly = 2;
module_param(latency_factor, uint, 0644);

+#ifdef CONFIG_ACPI_PROCFS
static u64 us_to_pm_timer_ticks(s64 t)
{
return div64_u64(t * PM_TIMER_FREQUENCY, 1000000);
}
+#endif
+
/*
* IBM ThinkPad R40e crashes mysteriously when going into C2 or C3.
* For now disable this. Probably a bug somewhere else.
--
1.6.5.2