Skip to content

Commit

Permalink
regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" …
Browse files Browse the repository at this point in the history
…DT property

It does not make sense to assign return value of of_property_read_u32() to
pdata->reg_init[idx]->warm_reset. Use of_property_read_bool() to read
"ti,warm-reset" DT property instead which will return correct setting
for pdata->reg_init[idx]->warm_reset.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Axel Lin authored and Mark Brown committed Mar 12, 2013
1 parent 7be859f commit 71f2146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/regulator/palmas-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ static void palmas_dt_to_pdata(struct device *dev,
sizeof(struct palmas_reg_init), GFP_KERNEL);

pdata->reg_init[idx]->warm_reset =
of_property_read_u32(palmas_matches[idx].of_node,
"ti,warm-reset", &prop);
of_property_read_bool(palmas_matches[idx].of_node,
"ti,warm-reset");

pdata->reg_init[idx]->roof_floor =
of_property_read_bool(palmas_matches[idx].of_node,
Expand Down

0 comments on commit 71f2146

Please sign in to comment.