lkml.org 
[lkml]   [2013]   [Mar]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property
From
Date
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>
---
drivers/regulator/palmas-regulator.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c
index b2b1baa..a9b558e 100644
--- a/drivers/regulator/palmas-regulator.c
+++ b/drivers/regulator/palmas-regulator.c
@@ -554,8 +554,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,
--
1.7.9.5




\
 
 \ /
  Last update: 2013-03-12 17:21    [W:0.368 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site