[PATCH 3/6] drivers/acpi: fix button driver compile error when CONFIG_PM_SLEEP is undefined

From: Shuah Khan
Date: Wed Feb 12 2014 - 22:20:15 EST


button driver defines acpi_button_resume() when CONFIG_PM_SLEEP is defined.
This results in the following compile error when CONFIG_PM_SLEEP is undefined.

drivers/acpi/button.c:85:8: error: âacpi_button_resumeâ undeclared here (not in a function)

Signed-off-by: Shuah Khan <shuah.kh@xxxxxxxxxxx>
---
drivers/acpi/button.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/acpi/button.c b/drivers/acpi/button.c
index 11c11f6..714e957 100644
--- a/drivers/acpi/button.c
+++ b/drivers/acpi/button.c
@@ -80,6 +80,8 @@ static void acpi_button_notify(struct acpi_device *device, u32 event);

#ifdef CONFIG_PM_SLEEP
static int acpi_button_resume(struct device *dev);
+#else
+#define acpi_button_resume NULL
#endif
static SIMPLE_DEV_PM_OPS(acpi_button_pm, NULL, acpi_button_resume);

--
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/