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 <collinsd@codeaurora.org>
This commit is contained in:
parent
589cf93950
commit
4ca937adde
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue