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

From: Shuah Khan
Date: Wed Feb 12 2014 - 22:21:02 EST


fan driver defines acpi_fan_suspend() and acpi_fan_resume() when
CONFIG_PM_SLEEP is defined. This results in the following compile error when
CONFIG_PM_SLEEP is undefined.

drivers/acpi/fan.c:60:8: error: âacpi_fan_suspendâ undeclared here (not in a function)
drivers/acpi/fan.c:60:8: error: âacpi_fan_resumeâ undeclared here (not in a function)

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

diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index 1fb6290..09e423f 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -55,6 +55,9 @@ MODULE_DEVICE_TABLE(acpi, fan_device_ids);
#ifdef CONFIG_PM_SLEEP
static int acpi_fan_suspend(struct device *dev);
static int acpi_fan_resume(struct device *dev);
+#else
+#define acpi_fan_suspend NULL
+#define acpi_fan_resume NULL
#endif
static SIMPLE_DEV_PM_OPS(acpi_fan_pm, acpi_fan_suspend, acpi_fan_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/