acpi: Fix warning: 'us_to_pm_timer_ticks' defined but not used
PATCH 1/1 acpi: Fix warning: 'us_to_pm_timer_ticks' defined but not used
Using:
gcc (GCC) 4.5.0 20100610 (prerelease)
The following warning is seen:
drivers/acpi/processor_idle.c:83:12: warning: ‘us_to_pm_timer_ticks’ defined but not used
This is because us_to_pm_timer_ticks is only used when CONFIG_ACPI_PROCFS is defined.
Fix the warning by moving the function definition into the #ifdef CONFIG_ACPI_PROCFS block.
Signed-off-by Kevin Winchester <[email protected]>
--- drivers/acpi/processor_idle.c | 10 ++++++---- 1 files changed, 6 insertions(+), 4 deletions(-)
drivers/acpi/processor_idle.c +6 -4
@@ -80,10 +80,6 @@ module_param(nocst, uint, 0000);static unsigned int latency_factor__read_mostly =2 ;module_param (latency_factor, uint,0644 ); -static u64 us_to_pm_timer_ticks (s64 t) -{ -return div64_u64 (t *PM_TIMER_FREQUENCY ,1000000 ); -}/* * IBM ThinkPad R40e crashes mysteriously when going into C2 or C3. * For now disable this. Probably a bug somewhere else.
@@ -685,6 +681,12 @@ static int acpi_processor_get_power_info(struct acpi_processor *pr) }#ifdef CONFIG_ACPI_PROCFS + +static u64 us_to_pm_timer_ticks (s64 t) +{ +return div64_u64 (t *PM_TIMER_FREQUENCY ,1000000 ); +} +static int acpi_processor_power_seq_show (struct seq_file *seq,void *offset) {struct acpi_processor *pr = seq->private;
Signature · 1 line
1.7.1.1