regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property
authorAxel Lin <axel.lin@ingics.com>
Tue, 12 Mar 2013 15:40:19 +0000 (23:40 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 12 Mar 2013 18:16:17 +0000 (18:16 +0000)
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>
drivers/regulator/palmas-regulator.c

index c25c2ff..122fea4 100644 (file)
@@ -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,