diff options
Diffstat (limited to 'drivers/regulator/max8997-regulator.c')
-rw-r--r-- | drivers/regulator/max8997-regulator.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/regulator/max8997-regulator.c b/drivers/regulator/max8997-regulator.c index ba47a5e2fbcb..829c3d9542af 100644 --- a/drivers/regulator/max8997-regulator.c +++ b/drivers/regulator/max8997-regulator.c @@ -943,14 +943,9 @@ static int max8997_pmic_dt_parse_pdata(struct platform_device *pdev, } of_node_put(regulators_np); - if (of_get_property(pmic_np, "max8997,pmic-buck1-uses-gpio-dvs", NULL)) - pdata->buck1_gpiodvs = true; - - if (of_get_property(pmic_np, "max8997,pmic-buck2-uses-gpio-dvs", NULL)) - pdata->buck2_gpiodvs = true; - - if (of_get_property(pmic_np, "max8997,pmic-buck5-uses-gpio-dvs", NULL)) - pdata->buck5_gpiodvs = true; + pdata->buck1_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck1-uses-gpio-dvs"); + pdata->buck2_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck2-uses-gpio-dvs"); + pdata->buck5_gpiodvs = of_property_read_bool(pmic_np, "max8997,pmic-buck5-uses-gpio-dvs"); if (pdata->buck1_gpiodvs || pdata->buck2_gpiodvs || pdata->buck5_gpiodvs) { |