Skip to content

Commit

Permalink
mfd: rk808: Mark pm functions __maybe_unused
Browse files Browse the repository at this point in the history
The newly added suspend/resume functions are only used if CONFIG_PM
is enabled:

drivers/mfd/rk808.c:752:12: error: 'rk8xx_resume' defined but not used [-Werror=unused-function]
drivers/mfd/rk808.c:732:12: error: 'rk8xx_suspend' defined but not used [-Werror=unused-function]

Mark them as __maybe_unused so the compiler can silently drop them
when they are not needed.

Fixes: 586c1b4 ("mfd: rk808: Add RK817 and RK809 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
  • Loading branch information
Arnd Bergmann authored and Lee Jones committed Aug 27, 2019
1 parent 5f9e832 commit 5752bc4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/mfd/rk808.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ static int rk808_remove(struct i2c_client *client)
return 0;
}

static int rk8xx_suspend(struct device *dev)
static int __maybe_unused rk8xx_suspend(struct device *dev)
{
struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
int ret = 0;
Expand All @@ -749,7 +749,7 @@ static int rk8xx_suspend(struct device *dev)
return ret;
}

static int rk8xx_resume(struct device *dev)
static int __maybe_unused rk8xx_resume(struct device *dev)
{
struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
int ret = 0;
Expand Down

0 comments on commit 5752bc4

Please sign in to comment.