diff options
author | Arnd Bergmann <arnd@arndb.de> | 2017-01-10 16:28:47 +0100 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2017-01-21 00:43:42 +0100 |
commit | 44e6861646748a21b55725adc0780342f4440066 (patch) | |
tree | 0d191d71c73eb107cb64922b10dfc28d613a2fff /drivers/platform/x86 | |
parent | platform/x86: mlx-platform: free first dev on error (diff) | |
download | linux-44e6861646748a21b55725adc0780342f4440066.tar.xz linux-44e6861646748a21b55725adc0780342f4440066.zip |
platform/x86: surface3-wmi: Shut up unused-function warning
The newly added driver guards its "resume" callback with an
warning in some configurations:
drivers/platform/x86/surface3-wmi.c:248:12: error: 's3_wmi_resume' defined but not used [-Werror=unused-function]
Using a __maybe_unused annotation without an #ifdef avoids the mistake more
reliably.
Fixes: 3dda3b3798f9 ("platform/x86: Add custom surface3 platform device for controlling LID")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/surface3-wmi.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/platform/x86/surface3-wmi.c b/drivers/platform/x86/surface3-wmi.c index cbf4d83a7271..6ac1d1349d7e 100644 --- a/drivers/platform/x86/surface3-wmi.c +++ b/drivers/platform/x86/surface3-wmi.c @@ -244,13 +244,11 @@ static int s3_wmi_remove(struct platform_device *device) return 0; } -#ifdef CONFIG_PM -static int s3_wmi_resume(struct device *dev) +static int __maybe_unused s3_wmi_resume(struct device *dev) { s3_wmi_send_lid_state(); return 0; } -#endif static SIMPLE_DEV_PM_OPS(s3_wmi_pm, NULL, s3_wmi_resume); static struct platform_driver s3_wmi_driver = { |