Commit 737f360d authored by Mark Brown's avatar Mark Brown

regulator: Remove support for supplies specified by struct device

This has been deprecated for a very long time now.
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarLiam Girdwood <lrg@ti.com>
parent fb87ef1a
...@@ -996,7 +996,6 @@ static int set_supply(struct regulator_dev *rdev, ...@@ -996,7 +996,6 @@ static int set_supply(struct regulator_dev *rdev,
/** /**
* set_consumer_device_supply - Bind a regulator to a symbolic supply * set_consumer_device_supply - Bind a regulator to a symbolic supply
* @rdev: regulator source * @rdev: regulator source
* @consumer_dev: device the supply applies to
* @consumer_dev_name: dev_name() string for device supply applies to * @consumer_dev_name: dev_name() string for device supply applies to
* @supply: symbolic name for supply * @supply: symbolic name for supply
* *
...@@ -1008,18 +1007,12 @@ static int set_supply(struct regulator_dev *rdev, ...@@ -1008,18 +1007,12 @@ static int set_supply(struct regulator_dev *rdev,
* Only one of consumer_dev and consumer_dev_name may be specified. * Only one of consumer_dev and consumer_dev_name may be specified.
*/ */
static int set_consumer_device_supply(struct regulator_dev *rdev, static int set_consumer_device_supply(struct regulator_dev *rdev,
struct device *consumer_dev, const char *consumer_dev_name, const char *consumer_dev_name,
const char *supply) const char *supply)
{ {
struct regulator_map *node; struct regulator_map *node;
int has_dev; 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) if (supply == NULL)
return -EINVAL; return -EINVAL;
...@@ -1039,11 +1032,12 @@ static int set_consumer_device_supply(struct regulator_dev *rdev, ...@@ -1039,11 +1032,12 @@ static int set_consumer_device_supply(struct regulator_dev *rdev,
if (strcmp(node->supply, supply) != 0) if (strcmp(node->supply, supply) != 0)
continue; continue;
dev_dbg(consumer_dev, "%s/%s is '%s' supply; fail %s/%s\n", pr_debug("%s: %s/%s is '%s' supply; fail %s/%s\n",
dev_name(&node->regulator->dev), consumer_dev_name,
node->regulator->desc->name, dev_name(&node->regulator->dev),
supply, node->regulator->desc->name,
dev_name(&rdev->dev), rdev_get_name(rdev)); supply,
dev_name(&rdev->dev), rdev_get_name(rdev));
return -EBUSY; return -EBUSY;
} }
...@@ -2855,7 +2849,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, ...@@ -2855,7 +2849,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
if (init_data) { if (init_data) {
for (i = 0; i < init_data->num_consumer_supplies; i++) { for (i = 0; i < init_data->num_consumer_supplies; i++) {
ret = set_consumer_device_supply(rdev, ret = set_consumer_device_supply(rdev,
init_data->consumer_supplies[i].dev,
init_data->consumer_supplies[i].dev_name, init_data->consumer_supplies[i].dev_name,
init_data->consumer_supplies[i].supply); init_data->consumer_supplies[i].supply);
if (ret < 0) { if (ret < 0) {
......
...@@ -139,12 +139,10 @@ struct regulation_constraints { ...@@ -139,12 +139,10 @@ struct regulation_constraints {
* make struct device available late such as I2C and is the preferred * make struct device available late such as I2C and is the preferred
* form. * form.
* *
* @dev: Device structure for the consumer.
* @dev_name: Result of dev_name() for the consumer. * @dev_name: Result of dev_name() for the consumer.
* @supply: Name for the supply. * @supply: Name for the supply.
*/ */
struct regulator_consumer_supply { struct regulator_consumer_supply {
struct device *dev; /* consumer */
const char *dev_name; /* dev_name() for consumer */ const char *dev_name; /* dev_name() for consumer */
const char *supply; /* consumer supply - e.g. "vcc" */ const char *supply; /* consumer supply - e.g. "vcc" */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment