diff options
author | Mark Brown <broonie@kernel.org> | 2020-01-23 12:37:08 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-01-23 12:37:08 +0000 |
commit | ebe0bdf9cfb97afc5ef4ef85e4f05d0585291ebf (patch) | |
tree | 87862eaf18d439b81c2a11106420f477faa22cb4 /drivers/regulator | |
parent | 9909f7986a8159200eaa8320ea081f337ebdd940 (diff) | |
parent | 0468e667a5bead9c1b7ded92861b5a98d8d78745 (diff) | |
download | linux-ebe0bdf9cfb97afc5ef4ef85e4f05d0585291ebf.tar.bz2 |
Merge remote-tracking branch 'regulator/topic/equal' into regulator-next
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/helpers.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/regulator/helpers.c b/drivers/regulator/helpers.c index ca3dc3f3bb29..bb16c465426e 100644 --- a/drivers/regulator/helpers.c +++ b/drivers/regulator/helpers.c @@ -13,6 +13,8 @@ #include <linux/regulator/driver.h> #include <linux/module.h> +#include "internal.h" + /** * regulator_is_enabled_regmap - standard is_enabled() for regmap users * @@ -881,3 +883,15 @@ void regulator_bulk_set_supply_names(struct regulator_bulk_data *consumers, consumers[i].supply = supply_names[i]; } EXPORT_SYMBOL_GPL(regulator_bulk_set_supply_names); + +/** + * regulator_is_equal - test whether two regulators are the same + * + * @reg1: first regulator to operate on + * @reg2: second regulator to operate on + */ +bool regulator_is_equal(struct regulator *reg1, struct regulator *reg2) +{ + return reg1->rdev == reg2->rdev; +} +EXPORT_SYMBOL_GPL(regulator_is_equal); |