Skip to content

Commit

Permalink
platform/surface: surface_gpe: Fix non-PM_SLEEP build warnings
Browse files Browse the repository at this point in the history
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: 274335f ("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>
  • Loading branch information
Randy Dunlap authored and Hans de Goede committed Jan 4, 2021
1 parent bbaa2e9 commit 6a4b1f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/platform/surface/surface_gpe.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,12 +181,12 @@ static int surface_lid_enable_wakeup(struct device *dev, bool enable)
return 0;
}

static int surface_gpe_suspend(struct device *dev)
static int __maybe_unused surface_gpe_suspend(struct device *dev)
{
return surface_lid_enable_wakeup(dev, true);
}

static int surface_gpe_resume(struct device *dev)
static int __maybe_unused surface_gpe_resume(struct device *dev)
{
return surface_lid_enable_wakeup(dev, false);
}
Expand Down

0 comments on commit 6a4b1f2

Please sign in to comment.