Commit 1474e4dbcae04125ed6e503eadcef266846f4675

Authored by Mark Brown

Merge branch 'regulator-register' into regulator-drivers

Showing 16 changed files Side-by-side Diff

drivers/regulator/ad5398.c
... ... @@ -184,7 +184,7 @@
184 184 .is_enabled = ad5398_is_enabled,
185 185 };
186 186  
187   -static struct regulator_desc ad5398_reg = {
  187 +static const struct regulator_desc ad5398_reg = {
188 188 .name = "isink",
189 189 .id = 0,
190 190 .ops = &ad5398_ops,
drivers/regulator/core.c
... ... @@ -2829,7 +2829,8 @@
2829 2829 * Called by regulator drivers to register a regulator.
2830 2830 * Returns 0 on success.
2831 2831 */
2832   -struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
  2832 +struct regulator_dev *
  2833 +regulator_register(const struct regulator_desc *regulator_desc,
2833 2834 struct device *dev, const struct regulator_init_data *init_data,
2834 2835 void *driver_data, struct device_node *of_node)
2835 2836 {
drivers/regulator/isl6271a-regulator.c
... ... @@ -112,7 +112,7 @@
112 112 .list_voltage = isl6271a_list_fixed_voltage,
113 113 };
114 114  
115   -static struct regulator_desc isl_rd[] = {
  115 +static const struct regulator_desc isl_rd[] = {
116 116 {
117 117 .name = "Core Buck",
118 118 .id = 0,
drivers/regulator/lp3971.c
... ... @@ -281,7 +281,7 @@
281 281 .set_voltage_sel = lp3971_dcdc_set_voltage_sel,
282 282 };
283 283  
284   -static struct regulator_desc regulators[] = {
  284 +static const struct regulator_desc regulators[] = {
285 285 {
286 286 .name = "LDO1",
287 287 .id = LP3971_LDO1,
drivers/regulator/lp3972.c
... ... @@ -444,7 +444,7 @@
444 444 .set_voltage_sel = lp3972_dcdc_set_voltage_sel,
445 445 };
446 446  
447   -static struct regulator_desc regulators[] = {
  447 +static const struct regulator_desc regulators[] = {
448 448 {
449 449 .name = "LDO1",
450 450 .id = LP3972_LDO1,
drivers/regulator/max1586.c
... ... @@ -161,7 +161,7 @@
161 161 .list_voltage = max1586_v6_list,
162 162 };
163 163  
164   -static struct regulator_desc max1586_reg[] = {
  164 +static const struct regulator_desc max1586_reg[] = {
165 165 {
166 166 .name = "Output_V3",
167 167 .id = MAX1586_V3,
drivers/regulator/max8649.c
... ... @@ -207,7 +207,7 @@
207 207  
208 208 };
209 209  
210   -static struct regulator_desc dcdc_desc = {
  210 +static const struct regulator_desc dcdc_desc = {
211 211 .name = "max8649",
212 212 .ops = &max8649_dcdc_ops,
213 213 .type = REGULATOR_VOLTAGE,
drivers/regulator/max8660.c
... ... @@ -313,7 +313,7 @@
313 313 .set_voltage = max8660_ldo67_set,
314 314 };
315 315  
316   -static struct regulator_desc max8660_reg[] = {
  316 +static const struct regulator_desc max8660_reg[] = {
317 317 {
318 318 .name = "V3(DCDC)",
319 319 .id = MAX8660_V3,
drivers/regulator/max8952.c
... ... @@ -159,7 +159,7 @@
159 159 .set_suspend_disable = max8952_disable,
160 160 };
161 161  
162   -static struct regulator_desc regulator = {
  162 +static const struct regulator_desc regulator = {
163 163 .name = "MAX8952_VOUT",
164 164 .id = 0,
165 165 .n_voltages = MAX8952_NUM_DVS_MODE,
drivers/regulator/pcap-regulator.c
... ... @@ -241,7 +241,7 @@
241 241 .owner = THIS_MODULE, \
242 242 }
243 243  
244   -static struct regulator_desc pcap_regulators[] = {
  244 +static const struct regulator_desc pcap_regulators[] = {
245 245 VREG(V1), VREG(V2), VREG(V3), VREG(V4), VREG(V5), VREG(V6), VREG(V7),
246 246 VREG(V8), VREG(V9), VREG(V10), VREG(VAUX1), VREG(VAUX2), VREG(VAUX3),
247 247 VREG(VAUX4), VREG(VSIM), VREG(VSIM2), VREG(VVIB), VREG(SW1), VREG(SW2),
drivers/regulator/pcf50633-regulator.c
... ... @@ -267,7 +267,7 @@
267 267 .is_enabled = pcf50633_regulator_is_enabled,
268 268 };
269 269  
270   -static struct regulator_desc regulators[] = {
  270 +static const struct regulator_desc regulators[] = {
271 271 [PCF50633_REGULATOR_AUTO] =
272 272 PCF50633_REGULATOR("auto", PCF50633_REGULATOR_AUTO, 128),
273 273 [PCF50633_REGULATOR_DOWN1] =
drivers/regulator/tps6105x-regulator.c
... ... @@ -123,7 +123,7 @@
123 123 .list_voltage = tps6105x_regulator_list_voltage,
124 124 };
125 125  
126   -static struct regulator_desc tps6105x_regulator_desc = {
  126 +static const struct regulator_desc tps6105x_regulator_desc = {
127 127 .name = "tps6105x-boost",
128 128 .ops = &tps6105x_regulator_ops,
129 129 .type = REGULATOR_VOLTAGE,
drivers/regulator/tps65217-regulator.c
... ... @@ -312,7 +312,7 @@
312 312 .list_voltage = tps65217_pmic_list_voltage,
313 313 };
314 314  
315   -static struct regulator_desc regulators[] = {
  315 +static const struct regulator_desc regulators[] = {
316 316 TPS65217_REGULATOR("DCDC1", TPS65217_DCDC_1, tps65217_pmic_ops, 64),
317 317 TPS65217_REGULATOR("DCDC2", TPS65217_DCDC_2, tps65217_pmic_ops, 64),
318 318 TPS65217_REGULATOR("DCDC3", TPS65217_DCDC_3, tps65217_pmic_ops, 64),
drivers/regulator/wm8350-regulator.c
... ... @@ -1269,7 +1269,7 @@
1269 1269 .enable_time = wm8350_isink_enable_time,
1270 1270 };
1271 1271  
1272   -static struct regulator_desc wm8350_reg[NUM_WM8350_REGULATORS] = {
  1272 +static const struct regulator_desc wm8350_reg[NUM_WM8350_REGULATORS] = {
1273 1273 {
1274 1274 .name = "DCDC1",
1275 1275 .id = WM8350_DCDC_1,
drivers/regulator/wm8994-regulator.c
... ... @@ -209,7 +209,7 @@
209 209 .set_voltage = wm8994_ldo2_set_voltage,
210 210 };
211 211  
212   -static struct regulator_desc wm8994_ldo_desc[] = {
  212 +static const struct regulator_desc wm8994_ldo_desc[] = {
213 213 {
214 214 .name = "LDO1",
215 215 .id = 1,
include/linux/regulator/driver.h
... ... @@ -184,7 +184,7 @@
184 184 * no other direct access).
185 185 */
186 186 struct regulator_dev {
187   - struct regulator_desc *desc;
  187 + const struct regulator_desc *desc;
188 188 int exclusive;
189 189 u32 use_count;
190 190 u32 open_count;
... ... @@ -210,7 +210,8 @@
210 210 struct dentry *debugfs;
211 211 };
212 212  
213   -struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
  213 +struct regulator_dev *
  214 +regulator_register(const struct regulator_desc *regulator_desc,
214 215 struct device *dev, const struct regulator_init_data *init_data,
215 216 void *driver_data, struct device_node *of_node);
216 217 void regulator_unregister(struct regulator_dev *rdev);