aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/palmas-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-03-12 11:40:19 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-12 14:16:17 -0400
commit71f2146f6c22716838ffafd054391826341874f9 (patch)
tree5dc40060ddab0dcc6a1c6046e4e2a9ae35c70a54 /drivers/regulator/palmas-regulator.c
parent7be859f74ce232361c39d92d29da207ce6ee72bb (diff)
regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" 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>
Diffstat (limited to 'drivers/regulator/palmas-regulator.c')
-rw-r--r--drivers/regulator/palmas-regulator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index c25c2ff48305..122fea432d38 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -553,8 +553,8 @@ static void palmas_dt_to_pdata(struct device *dev,
553 sizeof(struct palmas_reg_init), GFP_KERNEL); 553 sizeof(struct palmas_reg_init), GFP_KERNEL);
554 554
555 pdata->reg_init[idx]->warm_reset = 555 pdata->reg_init[idx]->warm_reset =
556 of_property_read_u32(palmas_matches[idx].of_node, 556 of_property_read_bool(palmas_matches[idx].of_node,
557 "ti,warm-reset", &prop); 557 "ti,warm-reset");
558 558
559 pdata->reg_init[idx]->roof_floor = 559 pdata->reg_init[idx]->roof_floor =
560 of_property_read_bool(palmas_matches[idx].of_node, 560 of_property_read_bool(palmas_matches[idx].of_node,