diff options
author | Arnd Bergmann <arnd@arndb.de> | 2019-07-08 08:53:02 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2019-08-27 02:35:44 -0400 |
commit | 5752bc4373b21c3fb1dd6db4dcdd569fae391a1d (patch) | |
tree | f1660ab621265248b09e3cb6eb81641050363f5b | |
parent | 5f9e832c137075045d15cd6899ab0505cfb2ca4b (diff) |
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.
Fixes: 586c1b4125b3 ("mfd: rk808: Add RK817 and RK809 support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
-rw-r--r-- | drivers/mfd/rk808.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/rk808.c b/drivers/mfd/rk808.c index 601cefb5c9d8..9a9e6315ba46 100644 --- a/drivers/mfd/rk808.c +++ b/drivers/mfd/rk808.c | |||
@@ -729,7 +729,7 @@ static int rk808_remove(struct i2c_client *client) | |||
729 | return 0; | 729 | return 0; |
730 | } | 730 | } |
731 | 731 | ||
732 | static int rk8xx_suspend(struct device *dev) | 732 | static int __maybe_unused rk8xx_suspend(struct device *dev) |
733 | { | 733 | { |
734 | struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); | 734 | struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); |
735 | int ret = 0; | 735 | int ret = 0; |
@@ -749,7 +749,7 @@ static int rk8xx_suspend(struct device *dev) | |||
749 | return ret; | 749 | return ret; |
750 | } | 750 | } |
751 | 751 | ||
752 | static int rk8xx_resume(struct device *dev) | 752 | static int __maybe_unused rk8xx_resume(struct device *dev) |
753 | { | 753 | { |
754 | struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); | 754 | struct rk808 *rk808 = i2c_get_clientdata(rk808_i2c_client); |
755 | int ret = 0; | 755 | int ret = 0; |