diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-01 19:10:51 -0500 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-02-02 09:03:24 -0500 |
commit | 737f360d5bef5e01c6cfa755dca0b449a154c1e0 (patch) | |
tree | ce9241643680f1a6f7691ae440175943fda7843d /drivers/regulator | |
parent | fb87ef1a123fa85bca1b6ac693a65752a7d0c718 (diff) |
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.c | 23 |
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, | |||
996 | /** | 996 | /** |
997 | * set_consumer_device_supply - Bind a regulator to a symbolic supply | 997 | * set_consumer_device_supply - Bind a regulator to a symbolic supply |
998 | * @rdev: regulator source | 998 | * @rdev: regulator source |
999 | * @consumer_dev: device the supply applies to | ||
1000 | * @consumer_dev_name: dev_name() string for device supply applies to | 999 | * @consumer_dev_name: dev_name() string for device supply applies to |
1001 | * @supply: symbolic name for supply | 1000 | * @supply: symbolic name for supply |
1002 | * | 1001 | * |
@@ -1008,18 +1007,12 @@ static int set_supply(struct regulator_dev *rdev, | |||
1008 | * Only one of consumer_dev and consumer_dev_name may be specified. | 1007 | * Only one of consumer_dev and consumer_dev_name may be specified. |
1009 | */ | 1008 | */ |
1010 | static int set_consumer_device_supply(struct regulator_dev *rdev, | 1009 | static int set_consumer_device_supply(struct regulator_dev *rdev, |
1011 | struct device *consumer_dev, const char *consumer_dev_name, | 1010 | const char *consumer_dev_name, |
1012 | const char *supply) | 1011 | const char *supply) |
1013 | { | 1012 | { |
1014 | struct regulator_map *node; | 1013 | struct regulator_map *node; |
1015 | int has_dev; | 1014 | int has_dev; |
1016 | 1015 | ||
1017 | if (consumer_dev && consumer_dev_name) | ||
1018 | return -EINVAL; | ||
1019 | |||
1020 | if (!consumer_dev_name && consumer_dev) | ||
1021 | consumer_dev_name = dev_name(consumer_dev); | ||
1022 | |||
1023 | if (supply == NULL) | 1016 | if (supply == NULL) |
1024 | return -EINVAL; | 1017 | return -EINVAL; |
1025 | 1018 | ||
@@ -1039,11 +1032,12 @@ static int set_consumer_device_supply(struct regulator_dev *rdev, | |||
1039 | if (strcmp(node->supply, supply) != 0) | 1032 | if (strcmp(node->supply, supply) != 0) |
1040 | continue; | 1033 | continue; |
1041 | 1034 | ||
1042 | dev_dbg(consumer_dev, "%s/%s is '%s' supply; fail %s/%s\n", | 1035 | pr_debug("%s: %s/%s is '%s' supply; fail %s/%s\n", |
1043 | dev_name(&node->regulator->dev), | 1036 | consumer_dev_name, |
1044 | node->regulator->desc->name, | 1037 | dev_name(&node->regulator->dev), |
1045 | supply, | 1038 | node->regulator->desc->name, |
1046 | dev_name(&rdev->dev), rdev_get_name(rdev)); | 1039 | supply, |
1040 | dev_name(&rdev->dev), rdev_get_name(rdev)); | ||
1047 | return -EBUSY; | 1041 | return -EBUSY; |
1048 | } | 1042 | } |
1049 | 1043 | ||
@@ -2855,7 +2849,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | |||
2855 | if (init_data) { | 2849 | if (init_data) { |
2856 | for (i = 0; i < init_data->num_consumer_supplies; i++) { | 2850 | for (i = 0; i < init_data->num_consumer_supplies; i++) { |
2857 | ret = set_consumer_device_supply(rdev, | 2851 | ret = set_consumer_device_supply(rdev, |
2858 | init_data->consumer_supplies[i].dev, | ||
2859 | init_data->consumer_supplies[i].dev_name, | 2852 | init_data->consumer_supplies[i].dev_name, |
2860 | init_data->consumer_supplies[i].supply); | 2853 | init_data->consumer_supplies[i].supply); |
2861 | if (ret < 0) { | 2854 | if (ret < 0) { |