diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 21:39:19 +0000 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 21:39:19 +0000 |
commit | 115e4bfd5bc68f870b3c889ab8f2d2733bcda452 (patch) | |
tree | d72053747d59cd5c537919990144c078d6b8cb55 /drivers/regulator | |
parent | c02f935f5f646fe1b5dbcd909e9d09c3a912914e (diff) | |
parent | 5bc78015998e14bf0362a01fc47e8b63053dbfd8 (diff) | |
download | linux-115e4bfd5bc68f870b3c889ab8f2d2733bcda452.tar.bz2 |
Merge remote-tracking branch 'regulator/topic/supply' into regulator-next
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index f4d31830f12b..e2f3afa71efb 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -995,7 +995,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 * @@ -1003,22 +1002,14 @@ static int set_supply(struct regulator_dev *rdev, * sources to symbolic names for supplies for use by devices. Devices * should use these symbolic names to request regulators, avoiding the * need to provide board-specific regulator names as platform data. - * - * 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; @@ -1038,11 +1029,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; } @@ -2955,7 +2947,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) { |