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>
This commit is contained in:

committed by
Mark Brown

parent
7d245afa24
commit
a8bd42a977
@@ -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
|
||||
|
Reference in New Issue
Block a user