Skip to content

Commit

Permalink
platform/chrome: cros_ec_lightbar - hide unused PM functions
Browse files Browse the repository at this point in the history
The only reference to the new functions is inside of an #ifdef,
which now causes a harmless warning when CONFIG_PM_SLEEP is not set:

chrome/cros_ec_dev.c:478:12: error: 'ec_device_resume' defined but not used [-Werror=unused-function]
chrome/cros_ec_dev.c:469:12: error: 'ec_device_suspend' defined but not used [-Werror=unused-function]

This marks the two functions as __maybe_unused so they can get
silently dropped by the compiler.

Fixes: 405c843 ("platform/chrome: cros_ec_lightbar - Control of suspend/resume lightbar sequence")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Guenter Roeck <groeck@chromium.org>
Signed-off-by: Benson Leung <bleung@chromium.org>
  • Loading branch information
Arnd Bergmann authored and Benson Leung committed Jun 27, 2017
1 parent 29d99b9 commit 5d6a312
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/platform/chrome/cros_ec_dev.c
Original file line number Diff line number Diff line change
@@ -466,7 +466,7 @@ static const struct platform_device_id cros_ec_id[] = {
};
MODULE_DEVICE_TABLE(platform, cros_ec_id);

static int ec_device_suspend(struct device *dev)
static __maybe_unused int ec_device_suspend(struct device *dev)
{
struct cros_ec_dev *ec = dev_get_drvdata(dev);

@@ -475,7 +475,7 @@ static int ec_device_suspend(struct device *dev)
return 0;
}

static int ec_device_resume(struct device *dev)
static __maybe_unused int ec_device_resume(struct device *dev)
{
struct cros_ec_dev *ec = dev_get_drvdata(dev);

0 comments on commit 5d6a312

Please sign in to comment.