Commit 9f8c0fe9 authored by Lee Jones's avatar Lee Jones Committed by Mark Brown

regulator: Constify the pointer to alias name array

Toughen-up checks for read-only regulator names.
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent c9eaa447
...@@ -1597,9 +1597,10 @@ EXPORT_SYMBOL_GPL(regulator_unregister_supply_alias); ...@@ -1597,9 +1597,10 @@ EXPORT_SYMBOL_GPL(regulator_unregister_supply_alias);
* registered any aliases that were registered will be removed * registered any aliases that were registered will be removed
* before returning to the caller. * before returning to the caller.
*/ */
int regulator_bulk_register_supply_alias(struct device *dev, const char **id, int regulator_bulk_register_supply_alias(struct device *dev,
const char *const *id,
struct device *alias_dev, struct device *alias_dev,
const char **alias_id, const char *const *alias_id,
int num_id) int num_id)
{ {
int i; int i;
...@@ -1637,7 +1638,7 @@ EXPORT_SYMBOL_GPL(regulator_bulk_register_supply_alias); ...@@ -1637,7 +1638,7 @@ EXPORT_SYMBOL_GPL(regulator_bulk_register_supply_alias);
* aliases in one operation. * aliases in one operation.
*/ */
void regulator_bulk_unregister_supply_alias(struct device *dev, void regulator_bulk_unregister_supply_alias(struct device *dev,
const char **id, const char *const *id,
int num_id) int num_id)
{ {
int i; int i;
......
...@@ -360,9 +360,9 @@ EXPORT_SYMBOL_GPL(devm_regulator_unregister_supply_alias); ...@@ -360,9 +360,9 @@ EXPORT_SYMBOL_GPL(devm_regulator_unregister_supply_alias);
* will be removed before returning to the caller. * will be removed before returning to the caller.
*/ */
int devm_regulator_bulk_register_supply_alias(struct device *dev, int devm_regulator_bulk_register_supply_alias(struct device *dev,
const char **id, const char *const *id,
struct device *alias_dev, struct device *alias_dev,
const char **alias_id, const char *const *alias_id,
int num_id) int num_id)
{ {
int i; int i;
...@@ -404,7 +404,7 @@ EXPORT_SYMBOL_GPL(devm_regulator_bulk_register_supply_alias); ...@@ -404,7 +404,7 @@ EXPORT_SYMBOL_GPL(devm_regulator_bulk_register_supply_alias);
* will ensure that the resource is freed. * will ensure that the resource is freed.
*/ */
void devm_regulator_bulk_unregister_supply_alias(struct device *dev, void devm_regulator_bulk_unregister_supply_alias(struct device *dev,
const char **id, const char *const *id,
int num_id) int num_id)
{ {
int i; int i;
......
...@@ -63,7 +63,7 @@ struct mfd_cell { ...@@ -63,7 +63,7 @@ struct mfd_cell {
/* A list of regulator supplies that should be mapped to the MFD /* A list of regulator supplies that should be mapped to the MFD
* device rather than the child device when requested * device rather than the child device when requested
*/ */
const char **parent_supplies; const char * const *parent_supplies;
int num_parent_supplies; int num_parent_supplies;
}; };
......
...@@ -151,11 +151,13 @@ int regulator_register_supply_alias(struct device *dev, const char *id, ...@@ -151,11 +151,13 @@ int regulator_register_supply_alias(struct device *dev, const char *id,
const char *alias_id); const char *alias_id);
void regulator_unregister_supply_alias(struct device *dev, const char *id); void regulator_unregister_supply_alias(struct device *dev, const char *id);
int regulator_bulk_register_supply_alias(struct device *dev, const char **id, int regulator_bulk_register_supply_alias(struct device *dev,
const char *const *id,
struct device *alias_dev, struct device *alias_dev,
const char **alias_id, int num_id); const char *const *alias_id,
int num_id);
void regulator_bulk_unregister_supply_alias(struct device *dev, void regulator_bulk_unregister_supply_alias(struct device *dev,
const char **id, int num_id); const char * const *id, int num_id);
int devm_regulator_register_supply_alias(struct device *dev, const char *id, int devm_regulator_register_supply_alias(struct device *dev, const char *id,
struct device *alias_dev, struct device *alias_dev,
...@@ -164,12 +166,12 @@ void devm_regulator_unregister_supply_alias(struct device *dev, ...@@ -164,12 +166,12 @@ void devm_regulator_unregister_supply_alias(struct device *dev,
const char *id); const char *id);
int devm_regulator_bulk_register_supply_alias(struct device *dev, int devm_regulator_bulk_register_supply_alias(struct device *dev,
const char **id, const char *const *id,
struct device *alias_dev, struct device *alias_dev,
const char **alias_id, const char *const *alias_id,
int num_id); int num_id);
void devm_regulator_bulk_unregister_supply_alias(struct device *dev, void devm_regulator_bulk_unregister_supply_alias(struct device *dev,
const char **id, const char *const *id,
int num_id); int num_id);
/* regulator output control and status */ /* regulator output control and status */
...@@ -290,17 +292,17 @@ static inline void regulator_unregister_supply_alias(struct device *dev, ...@@ -290,17 +292,17 @@ static inline void regulator_unregister_supply_alias(struct device *dev,
} }
static inline int regulator_bulk_register_supply_alias(struct device *dev, static inline int regulator_bulk_register_supply_alias(struct device *dev,
const char **id, const char *const *id,
struct device *alias_dev, struct device *alias_dev,
const char **alias_id, const char * const *alias_id,
int num_id) int num_id)
{ {
return 0; return 0;
} }
static inline void regulator_bulk_unregister_supply_alias(struct device *dev, static inline void regulator_bulk_unregister_supply_alias(struct device *dev,
const char **id, const char * const *id,
int num_id) int num_id)
{ {
} }
...@@ -317,15 +319,17 @@ static inline void devm_regulator_unregister_supply_alias(struct device *dev, ...@@ -317,15 +319,17 @@ static inline void devm_regulator_unregister_supply_alias(struct device *dev,
{ {
} }
static inline int devm_regulator_bulk_register_supply_alias( static inline int devm_regulator_bulk_register_supply_alias(struct device *dev,
struct device *dev, const char **id, struct device *alias_dev, const char *const *id,
const char **alias_id, int num_id) struct device *alias_dev,
const char *const *alias_id,
int num_id)
{ {
return 0; return 0;
} }
static inline void devm_regulator_bulk_unregister_supply_alias( static inline void devm_regulator_bulk_unregister_supply_alias(
struct device *dev, const char **id, int num_id) struct device *dev, const char *const *id, int num_id)
{ {
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment