UPSTREAM: mfd: rk808: Mark pm functions __maybe_unused

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.

Change-Id: I3db25d369f04883988fd934e11e26126de8cc6a4
Fixes: 586c1b4125 ("mfd: rk808: Add RK817 and RK809 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 5752bc4373)
This commit is contained in:
Arnd Bergmann
2019-07-08 14:53:02 +02:00
committed by Tao Huang
parent eac9158067
commit 1a0f1ce0a1

View File

@@ -1412,7 +1412,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)
{
int i, ret = 0;
struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);
@@ -1457,7 +1457,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)
{
int i, ret = 0;
struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client);