diff options
author | Felipe Balbi <balbi@ti.com> | 2014-07-08 15:09:14 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-07-09 04:29:19 -0400 |
commit | 6a5e06d9f4443c6f967ea7352cf30abdd681accf (patch) | |
tree | 4c76b1f22dedbd30842c67e3798bc3d9038dfba9 /drivers/regulator/tps65218-regulator.c | |
parent | dd648ef2471602d5fc1ec80a546eb0c3f57ca172 (diff) |
regulator: tps65218: drop order dependency
By just using GCC's array initialization extension, we
can easily drop order dependency between tps65218_regulattors
enumeration and tps65218_pmic_regs array.
Signed-of-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/tps65218-regulator.c')
-rw-r--r-- | drivers/regulator/tps65218-regulator.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/regulator/tps65218-regulator.c b/drivers/regulator/tps65218-regulator.c index 633d793cd053..e610dadcf6d1 100644 --- a/drivers/regulator/tps65218-regulator.c +++ b/drivers/regulator/tps65218-regulator.c | |||
@@ -49,7 +49,7 @@ enum tps65218_regulators { DCDC1, DCDC2, DCDC3, DCDC4, DCDC5, DCDC6, LDO1 }; | |||
49 | } \ | 49 | } \ |
50 | 50 | ||
51 | #define TPS65218_INFO(_id, _nm, _min, _max) \ | 51 | #define TPS65218_INFO(_id, _nm, _min, _max) \ |
52 | { \ | 52 | [_id] = { \ |
53 | .id = _id, \ | 53 | .id = _id, \ |
54 | .name = _nm, \ | 54 | .name = _nm, \ |
55 | .min_uV = _min, \ | 55 | .min_uV = _min, \ |
@@ -72,13 +72,13 @@ static const struct regulator_linear_range dcdc4_ranges[] = { | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | static struct tps_info tps65218_pmic_regs[] = { | 74 | static struct tps_info tps65218_pmic_regs[] = { |
75 | TPS65218_INFO(0, "DCDC1", 850000, 167500), | 75 | TPS65218_INFO(DCDC1, "DCDC1", 850000, 167500), |
76 | TPS65218_INFO(1, "DCDC2", 850000, 1675000), | 76 | TPS65218_INFO(DCDC2, "DCDC2", 850000, 1675000), |
77 | TPS65218_INFO(2, "DCDC3", 900000, 3400000), | 77 | TPS65218_INFO(DCDC3, "DCDC3", 900000, 3400000), |
78 | TPS65218_INFO(3, "DCDC4", 1175000, 3400000), | 78 | TPS65218_INFO(DCDC4, "DCDC4", 1175000, 3400000), |
79 | TPS65218_INFO(4, "DCDC5", 1000000, 1000000), | 79 | TPS65218_INFO(DCDC5, "DCDC5", 1000000, 1000000), |
80 | TPS65218_INFO(5, "DCDC6", 1800000, 1800000), | 80 | TPS65218_INFO(DCDC6, "DCDC6", 1800000, 1800000), |
81 | TPS65218_INFO(6, "LDO1", 900000, 3400000), | 81 | TPS65218_INFO(LDO1, "LDO1", 900000, 3400000), |
82 | }; | 82 | }; |
83 | 83 | ||
84 | #define TPS65218_OF_MATCH(comp, label) \ | 84 | #define TPS65218_OF_MATCH(comp, label) \ |