diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-02-03 22:56:02 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2017-02-04 11:31:52 +0100 |
commit | a8bd42a97741aefa5942605fa87418fc8a6c4169 (patch) | |
tree | 1fa5d8f7469d632e3ceed41d8d2687bd35e0f1ab /drivers/regulator/internal.h | |
parent | regulator: core: remove dead code in _regulator_get() (diff) | |
download | linux-a8bd42a97741aefa5942605fa87418fc8a6c4169.tar.xz linux-a8bd42a97741aefa5942605fa87418fc8a6c4169.zip |
regulator: core: have _regulator_get() accept get_type argument
Instead of separate "exclusive" and "allow_dummy" arguments, that formed 3
valid combinations (normal, exclusive and optional) and an invalid one,
let's accept explicit "get_type", like we did in devm-managed code.
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'drivers/regulator/internal.h')
-rw-r--r-- | drivers/regulator/internal.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/regulator/internal.h b/drivers/regulator/internal.h index c74ac8734023..1dd575b28564 100644 --- a/drivers/regulator/internal.h +++ b/drivers/regulator/internal.h @@ -51,4 +51,14 @@ regulator_of_get_init_data(struct device *dev, } #endif +enum regulator_get_type { + NORMAL_GET, + EXCLUSIVE_GET, + OPTIONAL_GET, + MAX_GET_TYPE +}; + +struct regulator *_regulator_get(struct device *dev, const char *id, + enum regulator_get_type get_type); + #endif |