From: Mathias Krause Date: Wed, 16 Jul 2014 17:43:06 +0000 (+0200) Subject: acer-wmi: Hide acer_{suspend,resume} for !CONFIG_PM_SLEEP X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=80f65558bdd14c0a113cd085582d578a3a3a1976;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git acer-wmi: Hide acer_{suspend,resume} for !CONFIG_PM_SLEEP Encapsulate acer_suspend() and acer_resume with #ifdef CONFIG_PM_SLEEP to get rid of the following warnings: ../acer-wmi.c:2046:12: warning: ‘acer_suspend’ defined but not used [-Wunused-function] ../acer-wmi.c:2068:12: warning: ‘acer_resume’ defined but not used [-Wunused-function] Signed-off-by: Mathias Krause Cc: "Lee, Chun-Yi" Signed-off-by: Matthew Garrett --- diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 48aae3ae82a1..0eecf9245d8c 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -2043,6 +2043,7 @@ static int acer_platform_remove(struct platform_device *device) return 0; } +#ifdef CONFIG_PM_SLEEP static int acer_suspend(struct device *dev) { u32 value; @@ -2083,6 +2084,10 @@ static int acer_resume(struct device *dev) return 0; } +#else +#define acer_suspend NULL +#define acer_resume NULL +#endif static SIMPLE_DEV_PM_OPS(acer_pm, acer_suspend, acer_resume);