From 4ca937adde46b98cc823a4ad61a77e257cae336a Mon Sep 17 00:00:00 2001 From: David Collins Date: Mon, 4 Aug 2014 17:27:04 -0700 Subject: [PATCH] regulator: tps65132-regulator: fix of_property_read_bool() usage The function of_property_read_bool() is used in the tps65132-regulator driver to test for the existence of non-boolean device tree property i2c-pwr-supply. This call will work as expected; however, of_property_read_bool() is only meant to be used for reading boolean device tree properties. Replace this usage of of_property_read_bool() with of_find_property(). Change-Id: I7f206d18db29899e04effea4a63c60f9ee5c1937 Signed-off-by: David Collins --- drivers/regulator/tps65132-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/tps65132-regulator.c b/drivers/regulator/tps65132-regulator.c index e3480034eec2..3642f653fcb5 100644 --- a/drivers/regulator/tps65132-regulator.c +++ b/drivers/regulator/tps65132-regulator.c @@ -387,7 +387,7 @@ static int tps65132_parse_dt(struct tps65132_chip *chip, pr_err("memory allocation failed for vreg\n"); return -ENOMEM; } - if (of_property_read_bool(client->dev.of_node, "i2c-pwr-supply")) { + if (of_find_property(client->dev.of_node, "i2c-pwr-supply", NULL)) { chip->i2c_pwr = devm_regulator_get(&client->dev, "i2c-pwr"); if (IS_ERR_OR_NULL(chip->i2c_pwr)) { rc = PTR_RET(chip->i2c_pwr);