diff options
-rw-r--r-- | drivers/regulator/core.c | 22 | ||||
-rw-r--r-- | drivers/regulator/devres.c | 6 | ||||
-rw-r--r-- | include/linux/mfd/core.h | 2 | ||||
-rw-r--r-- | include/linux/regulator/consumer.h | 36 |
4 files changed, 36 insertions, 30 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index d70f00f8fc66..4f0198a2524a 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c | |||
@@ -1439,9 +1439,9 @@ EXPORT_SYMBOL_GPL(regulator_get); | |||
1439 | * | 1439 | * |
1440 | * Returns a struct regulator corresponding to the regulator producer, | 1440 | * Returns a struct regulator corresponding to the regulator producer, |
1441 | * or IS_ERR() condition containing errno. Other consumers will be | 1441 | * or IS_ERR() condition containing errno. Other consumers will be |
1442 | * unable to obtain this reference is held and the use count for the | 1442 | * unable to obtain this regulator while this reference is held and the |
1443 | * regulator will be initialised to reflect the current state of the | 1443 | * use count for the regulator will be initialised to reflect the current |
1444 | * regulator. | 1444 | * state of the regulator. |
1445 | * | 1445 | * |
1446 | * This is intended for use by consumers which cannot tolerate shared | 1446 | * This is intended for use by consumers which cannot tolerate shared |
1447 | * use of the regulator such as those which need to force the | 1447 | * use of the regulator such as those which need to force the |
@@ -1465,10 +1465,7 @@ EXPORT_SYMBOL_GPL(regulator_get_exclusive); | |||
1465 | * @id: Supply name or regulator ID. | 1465 | * @id: Supply name or regulator ID. |
1466 | * | 1466 | * |
1467 | * Returns a struct regulator corresponding to the regulator producer, | 1467 | * Returns a struct regulator corresponding to the regulator producer, |
1468 | * or IS_ERR() condition containing errno. Other consumers will be | 1468 | * or IS_ERR() condition containing errno. |
1469 | * unable to obtain this reference is held and the use count for the | ||
1470 | * regulator will be initialised to reflect the current state of the | ||
1471 | * regulator. | ||
1472 | * | 1469 | * |
1473 | * This is intended for use by consumers for devices which can have | 1470 | * This is intended for use by consumers for devices which can have |
1474 | * some supplies unconnected in normal use, such as some MMC devices. | 1471 | * some supplies unconnected in normal use, such as some MMC devices. |
@@ -1606,9 +1603,10 @@ EXPORT_SYMBOL_GPL(regulator_unregister_supply_alias); | |||
1606 | * registered any aliases that were registered will be removed | 1603 | * registered any aliases that were registered will be removed |
1607 | * before returning to the caller. | 1604 | * before returning to the caller. |
1608 | */ | 1605 | */ |
1609 | int regulator_bulk_register_supply_alias(struct device *dev, const char **id, | 1606 | int regulator_bulk_register_supply_alias(struct device *dev, |
1607 | const char *const *id, | ||
1610 | struct device *alias_dev, | 1608 | struct device *alias_dev, |
1611 | const char **alias_id, | 1609 | const char *const *alias_id, |
1612 | int num_id) | 1610 | int num_id) |
1613 | { | 1611 | { |
1614 | int i; | 1612 | int i; |
@@ -1646,7 +1644,7 @@ EXPORT_SYMBOL_GPL(regulator_bulk_register_supply_alias); | |||
1646 | * aliases in one operation. | 1644 | * aliases in one operation. |
1647 | */ | 1645 | */ |
1648 | void regulator_bulk_unregister_supply_alias(struct device *dev, | 1646 | void regulator_bulk_unregister_supply_alias(struct device *dev, |
1649 | const char **id, | 1647 | const char *const *id, |
1650 | int num_id) | 1648 | int num_id) |
1651 | { | 1649 | { |
1652 | int i; | 1650 | int i; |
@@ -2330,6 +2328,10 @@ static int _regulator_do_set_voltage(struct regulator_dev *rdev, | |||
2330 | regulator_list_voltage_linear) | 2328 | regulator_list_voltage_linear) |
2331 | ret = regulator_map_voltage_linear(rdev, | 2329 | ret = regulator_map_voltage_linear(rdev, |
2332 | min_uV, max_uV); | 2330 | min_uV, max_uV); |
2331 | else if (rdev->desc->ops->list_voltage == | ||
2332 | regulator_list_voltage_linear_range) | ||
2333 | ret = regulator_map_voltage_linear_range(rdev, | ||
2334 | min_uV, max_uV); | ||
2333 | else | 2335 | else |
2334 | ret = regulator_map_voltage_iterate(rdev, | 2336 | ret = regulator_map_voltage_iterate(rdev, |
2335 | min_uV, max_uV); | 2337 | min_uV, max_uV); |
diff --git a/drivers/regulator/devres.c b/drivers/regulator/devres.c index f44818b838dc..8f785bc9e510 100644 --- a/drivers/regulator/devres.c +++ b/drivers/regulator/devres.c | |||
@@ -360,9 +360,9 @@ EXPORT_SYMBOL_GPL(devm_regulator_unregister_supply_alias); | |||
360 | * will be removed before returning to the caller. | 360 | * will be removed before returning to the caller. |
361 | */ | 361 | */ |
362 | int devm_regulator_bulk_register_supply_alias(struct device *dev, | 362 | int devm_regulator_bulk_register_supply_alias(struct device *dev, |
363 | const char **id, | 363 | const char *const *id, |
364 | struct device *alias_dev, | 364 | struct device *alias_dev, |
365 | const char **alias_id, | 365 | const char *const *alias_id, |
366 | int num_id) | 366 | int num_id) |
367 | { | 367 | { |
368 | int i; | 368 | int i; |
@@ -404,7 +404,7 @@ EXPORT_SYMBOL_GPL(devm_regulator_bulk_register_supply_alias); | |||
404 | * will ensure that the resource is freed. | 404 | * will ensure that the resource is freed. |
405 | */ | 405 | */ |
406 | void devm_regulator_bulk_unregister_supply_alias(struct device *dev, | 406 | void devm_regulator_bulk_unregister_supply_alias(struct device *dev, |
407 | const char **id, | 407 | const char *const *id, |
408 | int num_id) | 408 | int num_id) |
409 | { | 409 | { |
410 | int i; | 410 | int i; |
diff --git a/include/linux/mfd/core.h b/include/linux/mfd/core.h index bdba8c61207b..f543de91ce19 100644 --- a/include/linux/mfd/core.h +++ b/include/linux/mfd/core.h | |||
@@ -63,7 +63,7 @@ struct mfd_cell { | |||
63 | /* A list of regulator supplies that should be mapped to the MFD | 63 | /* A list of regulator supplies that should be mapped to the MFD |
64 | * device rather than the child device when requested | 64 | * device rather than the child device when requested |
65 | */ | 65 | */ |
66 | const char **parent_supplies; | 66 | const char * const *parent_supplies; |
67 | int num_parent_supplies; | 67 | int num_parent_supplies; |
68 | }; | 68 | }; |
69 | 69 | ||
diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 1a4a8c157b31..ccd3d777ee03 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h | |||
@@ -151,11 +151,13 @@ int regulator_register_supply_alias(struct device *dev, const char *id, | |||
151 | const char *alias_id); | 151 | const char *alias_id); |
152 | void regulator_unregister_supply_alias(struct device *dev, const char *id); | 152 | void regulator_unregister_supply_alias(struct device *dev, const char *id); |
153 | 153 | ||
154 | int regulator_bulk_register_supply_alias(struct device *dev, const char **id, | 154 | int regulator_bulk_register_supply_alias(struct device *dev, |
155 | const char *const *id, | ||
155 | struct device *alias_dev, | 156 | struct device *alias_dev, |
156 | const char **alias_id, int num_id); | 157 | const char *const *alias_id, |
158 | int num_id); | ||
157 | void regulator_bulk_unregister_supply_alias(struct device *dev, | 159 | void regulator_bulk_unregister_supply_alias(struct device *dev, |
158 | const char **id, int num_id); | 160 | const char * const *id, int num_id); |
159 | 161 | ||
160 | int devm_regulator_register_supply_alias(struct device *dev, const char *id, | 162 | int devm_regulator_register_supply_alias(struct device *dev, const char *id, |
161 | struct device *alias_dev, | 163 | struct device *alias_dev, |
@@ -164,12 +166,12 @@ void devm_regulator_unregister_supply_alias(struct device *dev, | |||
164 | const char *id); | 166 | const char *id); |
165 | 167 | ||
166 | int devm_regulator_bulk_register_supply_alias(struct device *dev, | 168 | int devm_regulator_bulk_register_supply_alias(struct device *dev, |
167 | const char **id, | 169 | const char *const *id, |
168 | struct device *alias_dev, | 170 | struct device *alias_dev, |
169 | const char **alias_id, | 171 | const char *const *alias_id, |
170 | int num_id); | 172 | int num_id); |
171 | void devm_regulator_bulk_unregister_supply_alias(struct device *dev, | 173 | void devm_regulator_bulk_unregister_supply_alias(struct device *dev, |
172 | const char **id, | 174 | const char *const *id, |
173 | int num_id); | 175 | int num_id); |
174 | 176 | ||
175 | /* regulator output control and status */ | 177 | /* regulator output control and status */ |
@@ -290,17 +292,17 @@ static inline void regulator_unregister_supply_alias(struct device *dev, | |||
290 | } | 292 | } |
291 | 293 | ||
292 | static inline int regulator_bulk_register_supply_alias(struct device *dev, | 294 | static inline int regulator_bulk_register_supply_alias(struct device *dev, |
293 | const char **id, | 295 | const char *const *id, |
294 | struct device *alias_dev, | 296 | struct device *alias_dev, |
295 | const char **alias_id, | 297 | const char * const *alias_id, |
296 | int num_id) | 298 | int num_id) |
297 | { | 299 | { |
298 | return 0; | 300 | return 0; |
299 | } | 301 | } |
300 | 302 | ||
301 | static inline void regulator_bulk_unregister_supply_alias(struct device *dev, | 303 | static inline void regulator_bulk_unregister_supply_alias(struct device *dev, |
302 | const char **id, | 304 | const char * const *id, |
303 | int num_id) | 305 | int num_id) |
304 | { | 306 | { |
305 | } | 307 | } |
306 | 308 | ||
@@ -317,15 +319,17 @@ static inline void devm_regulator_unregister_supply_alias(struct device *dev, | |||
317 | { | 319 | { |
318 | } | 320 | } |
319 | 321 | ||
320 | static inline int devm_regulator_bulk_register_supply_alias( | 322 | static inline int devm_regulator_bulk_register_supply_alias(struct device *dev, |
321 | struct device *dev, const char **id, struct device *alias_dev, | 323 | const char *const *id, |
322 | const char **alias_id, int num_id) | 324 | struct device *alias_dev, |
325 | const char *const *alias_id, | ||
326 | int num_id) | ||
323 | { | 327 | { |
324 | return 0; | 328 | return 0; |
325 | } | 329 | } |
326 | 330 | ||
327 | static inline void devm_regulator_bulk_unregister_supply_alias( | 331 | static inline void devm_regulator_bulk_unregister_supply_alias( |
328 | struct device *dev, const char **id, int num_id) | 332 | struct device *dev, const char *const *id, int num_id) |
329 | { | 333 | { |
330 | } | 334 | } |
331 | 335 | ||