diff options
author | Mark Brown <broonie@kernel.org> | 2020-01-23 13:36:45 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-01-23 13:36:45 +0100 |
commit | a7196caf83ea9e9b56c5c8c95fbfe0d45acec46b (patch) | |
tree | d9147ac16e1af83463bad4e45b233bc8e51f2e0e /drivers/regulator/helpers.c | |
parent | Merge branch 'asoc-5.5' into asoc-linus (diff) | |
parent | ASoC: soc-core: remove null_snd_soc_ops (diff) | |
download | linux-a7196caf83ea9e9b56c5c8c95fbfe0d45acec46b.tar.xz linux-a7196caf83ea9e9b56c5c8c95fbfe0d45acec46b.zip |
Merge branch 'asoc-5.6' into asoc-next
Diffstat (limited to 'drivers/regulator/helpers.c')
-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); |