From: Axel Lin Date: Tue, 12 Mar 2013 15:40:19 +0000 (+0800) Subject: regulator: palmas: Use of_property_read_bool to read "ti,warm-reset" DT property X-Git-Tag: firefly_0821_release~3680^2~668^2~8^2~12 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=71f2146f6c22716838ffafd054391826341874f9;p=firefly-linux-kernel-4.4.55.git 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 Acked-by: Graeme Gregory Signed-off-by: Mark Brown --- 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, 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,