diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-05-08 17:30:18 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-05-27 05:34:37 -0400 |
commit | 492c826b9facefa84995f4dea917e301b5ee0884 (patch) | |
tree | f0ac1382e4b9047d43d522ce1cb111e74f84d61b | |
parent | ba413c5972676295862797a46f9070f81691d80e (diff) |
regulator: Remove supply_regulator_dev from machine configuration
supply_regulator_dev (using a struct pointer) has been deprecated in favour
of supply_regulator (using a regulator name) for quite a few releases
now with a warning generated if it is used and there are no current in tree
users so just remove the code.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
-rw-r--r-- | Documentation/power/regulator/machine.txt | 4 | ||||
-rw-r--r-- | drivers/regulator/core.c | 16 | ||||
-rw-r--r-- | include/linux/regulator/machine.h | 3 |
3 files changed, 2 insertions, 21 deletions
diff --git a/Documentation/power/regulator/machine.txt b/Documentation/power/regulator/machine.txt index bdec39b9bd75..b42419b52e44 100644 --- a/Documentation/power/regulator/machine.txt +++ b/Documentation/power/regulator/machine.txt | |||
@@ -53,11 +53,11 @@ static struct regulator_init_data regulator1_data = { | |||
53 | 53 | ||
54 | Regulator-1 supplies power to Regulator-2. This relationship must be registered | 54 | Regulator-1 supplies power to Regulator-2. This relationship must be registered |
55 | with the core so that Regulator-1 is also enabled when Consumer A enables its | 55 | with the core so that Regulator-1 is also enabled when Consumer A enables its |
56 | supply (Regulator-2). The supply regulator is set by the supply_regulator_dev | 56 | supply (Regulator-2). The supply regulator is set by the supply_regulator |
57 | field below:- | 57 | field below:- |
58 | 58 | ||
59 | static struct regulator_init_data regulator2_data = { | 59 | static struct regulator_init_data regulator2_data = { |
60 | .supply_regulator_dev = &platform_regulator1_device.dev, | 60 | .supply_regulator = "regulator_name", |
61 | .constraints = { | 61 | .constraints = { |
62 | .min_uV = 1800000, | 62 | .min_uV = 1800000, |
63 | .max_uV = 2000000, | 63 | .max_uV = 2000000, |
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 98d25fcb3930..432faa5cb8af 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -2596,14 +2596,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | |||
2596 | if (ret < 0) | 2596 | if (ret < 0) |
2597 | goto scrub; | 2597 | goto scrub; |
2598 | 2598 | ||
2599 | /* set supply regulator if it exists */ | ||
2600 | if (init_data->supply_regulator && init_data->supply_regulator_dev) { | ||
2601 | dev_err(dev, | ||
2602 | "Supply regulator specified by both name and dev\n"); | ||
2603 | ret = -EINVAL; | ||
2604 | goto scrub; | ||
2605 | } | ||
2606 | |||
2607 | if (init_data->supply_regulator) { | 2599 | if (init_data->supply_regulator) { |
2608 | struct regulator_dev *r; | 2600 | struct regulator_dev *r; |
2609 | int found = 0; | 2601 | int found = 0; |
@@ -2628,14 +2620,6 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, | |||
2628 | goto scrub; | 2620 | goto scrub; |
2629 | } | 2621 | } |
2630 | 2622 | ||
2631 | if (init_data->supply_regulator_dev) { | ||
2632 | dev_warn(dev, "Uses supply_regulator_dev instead of regulator_supply\n"); | ||
2633 | ret = set_supply(rdev, | ||
2634 | dev_get_drvdata(init_data->supply_regulator_dev)); | ||
2635 | if (ret < 0) | ||
2636 | goto scrub; | ||
2637 | } | ||
2638 | |||
2639 | /* add consumers devices */ | 2623 | /* add consumers devices */ |
2640 | for (i = 0; i < init_data->num_consumer_supplies; i++) { | 2624 | for (i = 0; i < init_data->num_consumer_supplies; i++) { |
2641 | ret = set_consumer_device_supply(rdev, | 2625 | ret = set_consumer_device_supply(rdev, |
diff --git a/include/linux/regulator/machine.h b/include/linux/regulator/machine.h index c4c4fc45f856..8f1a55d99494 100644 --- a/include/linux/regulator/machine.h +++ b/include/linux/regulator/machine.h | |||
@@ -160,8 +160,6 @@ struct regulator_consumer_supply { | |||
160 | * @supply_regulator: Parent regulator. Specified using the regulator name | 160 | * @supply_regulator: Parent regulator. Specified using the regulator name |
161 | * as it appears in the name field in sysfs, which can | 161 | * as it appears in the name field in sysfs, which can |
162 | * be explicitly set using the constraints field 'name'. | 162 | * be explicitly set using the constraints field 'name'. |
163 | * @supply_regulator_dev: Parent regulator (if any) - DEPRECATED in favour | ||
164 | * of supply_regulator. | ||
165 | * | 163 | * |
166 | * @constraints: Constraints. These must be specified for the regulator to | 164 | * @constraints: Constraints. These must be specified for the regulator to |
167 | * be usable. | 165 | * be usable. |
@@ -173,7 +171,6 @@ struct regulator_consumer_supply { | |||
173 | */ | 171 | */ |
174 | struct regulator_init_data { | 172 | struct regulator_init_data { |
175 | const char *supply_regulator; /* or NULL for system supply */ | 173 | const char *supply_regulator; /* or NULL for system supply */ |
176 | struct device *supply_regulator_dev; /* or NULL for system supply */ | ||
177 | 174 | ||
178 | struct regulation_constraints constraints; | 175 | struct regulation_constraints constraints; |
179 | 176 | ||