Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

platform/surface: surface_gpe: Fix non-PM_SLEEP build warnings

Fix build warnings when CONFIG_PM_SLEEP is not enabled and these
functions are not used:

../drivers/platform/surface/surface_gpe.c:189:12: warning: ‘surface_gpe_resume’ defined but not used [-Wunused-function]
static int surface_gpe_resume(struct device *dev)
^~~~~~~~~~~~~~~~~~
../drivers/platform/surface/surface_gpe.c:184:12: warning: ‘surface_gpe_suspend’ defined but not used [-Wunused-function]
static int surface_gpe_suspend(struct device *dev)
^~~~~~~~~~~~~~~~~~~

Fixes: 274335f1c557 ("platform/surface: Add Driver to set up lid GPEs on MS Surface device")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Maximilian Luz <luzmaximilian@gmail.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: platform-driver-x86@vger.kernel.org
Reviewed-by: Maximilian Luz <luzmaximilian@gmail.com>
Link: https://lore.kernel.org/r/20201214233336.19782-1-rdunlap@infradead.org
Signed-off-by: Hans de Goede <hdegoede@redhat.com>

authored by

Randy Dunlap and committed by
Hans de Goede
6a4b1f2d bbaa2e95

+2 -2
+2 -2
drivers/platform/surface/surface_gpe.c
··· 181 181 return 0; 182 182 } 183 183 184 - static int surface_gpe_suspend(struct device *dev) 184 + static int __maybe_unused surface_gpe_suspend(struct device *dev) 185 185 { 186 186 return surface_lid_enable_wakeup(dev, true); 187 187 } 188 188 189 - static int surface_gpe_resume(struct device *dev) 189 + static int __maybe_unused surface_gpe_resume(struct device *dev) 190 190 { 191 191 return surface_lid_enable_wakeup(dev, false); 192 192 }