* [PATCH] regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property
@ 2013-03-12 15:40 Axel Lin
2013-03-12 16:10 ` Graeme Gregory
2013-03-12 18:16 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2013-03-12 15:40 UTC (permalink / raw)
To: Mark Brown; +Cc: Graeme Gregory, Liam Girdwood, linux-kernel
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property
2013-03-12 15:40 [PATCH] regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property Axel Lin
@ 2013-03-12 16:10 ` Graeme Gregory
2013-03-12 18:16 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Graeme Gregory @ 2013-03-12 16:10 UTC (permalink / raw)
To: Axel Lin; +Cc: Mark Brown, Liam Girdwood, linux-kernel
Thanks for catching that typo
Acked-by: Graeme Gregory <gg@slimlogic.co.uk>
On 12/03/13 15:40, Axel Lin wrote:
> 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,
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property
2013-03-12 15:40 [PATCH] regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property Axel Lin
2013-03-12 16:10 ` Graeme Gregory
@ 2013-03-12 18:16 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-03-12 18:16 UTC (permalink / raw)
To: Axel Lin; +Cc: Graeme Gregory, Liam Girdwood, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 337 bytes --]
On Tue, Mar 12, 2013 at 11:40:19PM +0800, Axel Lin wrote:
> 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.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-12 18:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 15:40 [PATCH] regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property Axel Lin
2013-03-12 16:10 ` Graeme Gregory
2013-03-12 18:16 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox