mirror of https://github.com/torvalds/linux.git
regulator: Small cleanup in of_get_regulation_constraints()
Just pass "init_data" instead the address of it. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://patch.msgid.link/aQYKoiivuec3m0Jj@stanley.mountain Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
28039efa4d
commit
252abf2d07
|
|
@ -79,10 +79,10 @@ static void of_get_regulator_prot_limits(struct device_node *np,
|
|||
|
||||
static int of_get_regulation_constraints(struct device *dev,
|
||||
struct device_node *np,
|
||||
struct regulator_init_data **init_data,
|
||||
struct regulator_init_data *init_data,
|
||||
const struct regulator_desc *desc)
|
||||
{
|
||||
struct regulation_constraints *constraints = &(*init_data)->constraints;
|
||||
struct regulation_constraints *constraints = &init_data->constraints;
|
||||
struct regulator_state *suspend_state;
|
||||
struct device_node *suspend_np;
|
||||
unsigned int mode;
|
||||
|
|
@ -359,7 +359,7 @@ struct regulator_init_data *of_get_regulator_init_data(struct device *dev,
|
|||
if (!init_data)
|
||||
return NULL; /* Out of memory? */
|
||||
|
||||
if (of_get_regulation_constraints(dev, node, &init_data, desc))
|
||||
if (of_get_regulation_constraints(dev, node, init_data, desc))
|
||||
return NULL;
|
||||
|
||||
return init_data;
|
||||
|
|
|
|||
Loading…
Reference in New Issue