From: Al Stone ahs3@redhat.com
This function was not defined as a pointer to a function but as a function. This resulted in a "test is always true" warning in drivers/acpi/sleep.c where it tested for the existence of the function.
Signed-off-by: Al Stone al.stone@linaro.org --- arch/arm/include/asm/acpi.h | 2 +- arch/arm64/include/asm/acpi.h | 2 +- drivers/acpi/plat/arm/sleep.c | 11 +++++++++-- 3 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/arch/arm/include/asm/acpi.h b/arch/arm/include/asm/acpi.h index ca7efaa..31f21fd 100644 --- a/arch/arm/include/asm/acpi.h +++ b/arch/arm/include/asm/acpi.h @@ -115,7 +115,7 @@ extern struct acpi_arm_root acpi_arm_rsdp_info; void arm_acpi_reserve_memory(void);
/* Low-level suspend routine. */ -extern int acpi_suspend_lowlevel(void); +extern int (*acpi_suspend_lowlevel)(void);
extern void prefill_possible_map(void);
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h index a19b73f..aee7190 100644 --- a/arch/arm64/include/asm/acpi.h +++ b/arch/arm64/include/asm/acpi.h @@ -93,7 +93,7 @@ extern struct acpi_arm_root acpi_arm_rsdp_info; void arm_acpi_reserve_memory(void);
/* Low-level suspend routine. */ -extern int acpi_suspend_lowlevel(void); +extern int (*acpi_suspend_lowlevel)(void);
extern void prefill_possible_map(void);
diff --git a/drivers/acpi/plat/arm/sleep.c b/drivers/acpi/plat/arm/sleep.c index 9129c7e..ac5e343 100644 --- a/drivers/acpi/plat/arm/sleep.c +++ b/drivers/acpi/plat/arm/sleep.c @@ -1,15 +1,22 @@ /* - * sleep.c - x86-specific ACPI sleep support. + * sleep.c - ARM-specific ACPI sleep support. * * Copyright (C) 2001-2003 Patrick Mochel * Copyright (C) 2001-2003 Pavel Machek pavel@ucw.cz */
+#ifdef CONFIG_ACPI_SLEEP int acpi_suspend_lowlevel(void) { - /* BOZO: dummy routine; see below for actual */ + /* + * TODO: connect this function to PSCI when it becomes available, + * and if actually needed. + */ return 0; } +#else +int acpi_suspend_lowlevel(void); +#endif
#ifdef CONFIG_X86 /* BOZO: disable everything for now... */