summaryrefslogtreecommitdiffstats
path: root/drivers/regulator
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-02 00:10:51 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-02-02 14:03:24 +0000
commit737f360d5bef5e01c6cfa755dca0b449a154c1e0 (patch)
treece9241643680f1a6f7691ae440175943fda7843d /drivers/regulator
parentfb87ef1a123fa85bca1b6ac693a65752a7d0c718 (diff)
downloadlinux-737f360d5bef5e01c6cfa755dca0b449a154c1e0.tar.bz2
regulator: Remove support for supplies specified by struct device
This has been deprecated for a very long time now. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'drivers/regulator')
-rw-r--r--drivers/regulator/core.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index e9a83f84adaf..b9c900e81790 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -996,7 +996,6 @@ static int set_supply(struct regulator_dev *rdev,
/**
* set_consumer_device_supply - Bind a regulator to a symbolic supply
* @rdev: regulator source
- * @consumer_dev: device the supply applies to
* @consumer_dev_name: dev_name() string for device supply applies to
* @supply: symbolic name for supply
*
@@ -1008,18 +1007,12 @@ static int set_supply(struct regulator_dev *rdev,
* Only one of consumer_dev and consumer_dev_name may be specified.
*/
static int set_consumer_device_supply(struct regulator_dev *rdev,
- struct device *consumer_dev, const char *consumer_dev_name,
- const char *supply)
+ const char *consumer_dev_name,
+ const char *supply)
{
struct regulator_map *node;
int has_dev;
- if (consumer_dev && consumer_dev_name)
- return -EINVAL;
-
- if (!consumer_dev_name && consumer_dev)
- consumer_dev_name = dev_name(consumer_dev);
-
if (supply == NULL)
return -EINVAL;
@@ -1039,11 +1032,12 @@ static int set_consumer_device_supply(struct regulator_dev *rdev,
if (strcmp(node->supply, supply) != 0)
continue;
- dev_dbg(consumer_dev, "%s/%s is '%s' supply; fail %s/%s\n",
- dev_name(&node->regulator->dev),
- node->regulator->desc->name,
- supply,
- dev_name(&rdev->dev), rdev_get_name(rdev));
+ pr_debug("%s: %s/%s is '%s' supply; fail %s/%s\n",
+ consumer_dev_name,
+ dev_name(&node->regulator->dev),
+ node->regulator->desc->name,
+ supply,
+ dev_name(&rdev->dev), rdev_get_name(rdev));
return -EBUSY;
}
@@ -2855,7 +2849,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
if (init_data) {
for (i = 0; i < init_data->num_consumer_supplies; i++) {
ret = set_consumer_device_supply(rdev,
- init_data->consumer_supplies[i].dev,
init_data->consumer_supplies[i].dev_name,
init_data->consumer_supplies[i].supply);
if (ret < 0) {