diff mbox

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

Message ID 1e50ddee5b89d7566b9af4f5cb8b54e2614f04c0.1392250669.git.shuah.kh@samsung.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Shuah Khan Feb. 13, 2014, 3:19 a.m. UTC
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@samsung.com>
---
 drivers/acpi/fan.c |    3 +++
 1 file changed, 3 insertions(+)
diff mbox

Patch

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);