diff options
author | Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com> | 2021-06-03 08:41:37 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2021-06-21 15:08:39 +0300 |
commit | 157d2230193ae683fcffcc1cd0a2c3aa4479955f (patch) | |
tree | f5ac0877ce96d72bbf037b300c70a1f6544fe827 /include/linux/regulator/driver.h | |
parent | e6c3092d43faf0aa095160cc552f8c05490d0962 (diff) | |
download | linux-157d2230193ae683fcffcc1cd0a2c3aa4479955f.tar.xz |
regulator: move rdev_print helpers to internal.h
The rdev print helpers are a nice way to print messages related to a
specific regulator device. Move them from core.c to internal.h
As the rdev print helpers use rdev_get_name() export it from core.c. Also
move the declaration from coupler.h to driver.h because the rdev name is
not just a coupled regulator property. I guess the main audience for
rdev_get_name() will be the regulator core and drivers.
Signed-off-by: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
Link: https://lore.kernel.org/r/dc7fd70dc31de4d0e820b7646bb78eeb04f80735.1622628333.git.matti.vaittinen@fi.rohmeurope.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'include/linux/regulator/driver.h')
-rw-r--r-- | include/linux/regulator/driver.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/regulator/driver.h b/include/linux/regulator/driver.h index 4ea520c248e9..7ec0fa79d1a8 100644 --- a/include/linux/regulator/driver.h +++ b/include/linux/regulator/driver.h @@ -550,4 +550,14 @@ int regulator_desc_list_voltage_linear_range(const struct regulator_desc *desc, int regulator_desc_list_voltage_linear(const struct regulator_desc *desc, unsigned int selector); + +#ifdef CONFIG_REGULATOR +const char *rdev_get_name(struct regulator_dev *rdev); +#else +static inline const char *rdev_get_name(struct regulator_dev *rdev) +{ + return NULL; +} +#endif + #endif |