regulator_suspend_enable(), regulator_suspend_disable() and regulator_set_suspend_voltage() are all exported members of the API, but are all missing prototypes. Fixes the following W=1 warning(s): drivers/regulator/core.c:3805:5: warning: no previous prototype for ‘regulator_suspend_enable’ [-Wmissing-prototypes] 3805 | int regulator_suspend_enable(struct regulator_dev *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/core.c:3812:5: warning: no previous prototype for ‘regulator_suspend_disable’ [-Wmissing-prototypes] 3812 | int regulator_suspend_disable(struct regulator_dev *rdev, | ^~~~~~~~~~~~~~~~~~~~~~~~~ drivers/regulator/core.c:3851:5: warning: no previous prototype for ‘regulator_set_suspend_voltage’ [-Wmissing-prototypes] 3851 | int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV, | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Showing the changes to include/linux (1 of 1 file). Show all
Unified · Split
| @@ -32,10 +32,12 @@ · 31 unmodified lines | ||
| 32 | 32 | #define __LINUX_REGULATOR_CONSUMER_H_ |
| 33 | 33 | |
| 34 | 34 | #include <linux/err.h> |
| 35 | +#include <linux/suspend.h> | |
| 35 | 36 | |
| 36 | 37 | struct device; |
| 37 | 38 | struct notifier_block; |
| 38 | 39 | struct regmap; |
| 40 | +struct regulator_dev; | |
| 39 | 41 | |
| 40 | 42 | /* |
| 41 | 43 | * Regulator operating modes. |
| @@ -277,6 +279,14 @@ int regulator_unregister_notifier(struct regulator *regulator, · 235 unmodified lines | ||
| 277 | 279 | void devm_regulator_unregister_notifier(struct regulator *regulator, |
| 278 | 280 | struct notifier_block *nb); |
| 279 | 281 | |
| 282 | +/* regulator suspend */ | |
| 283 | +int regulator_suspend_enable(struct regulator_dev *rdev, | |
| 284 | + suspend_state_t state); | |
| 285 | +int regulator_suspend_disable(struct regulator_dev *rdev, | |
| 286 | + suspend_state_t state); | |
| 287 | +int regulator_set_suspend_voltage(struct regulator *regulator, int min_uV, | |
| 288 | + int max_uV, suspend_state_t state); | |
| 289 | + | |
| 280 | 290 | /* driver data - core doesn't touch */ |
| 281 | 291 | void *regulator_get_drvdata(struct regulator *regulator); |
| 282 | 292 | void regulator_set_drvdata(struct regulator *regulator, void *data); |