summaryrefslogtreecommitdiff
path: root/drivers/mfd/wm8994-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mfd/wm8994-core.c')
-rw-r--r--drivers/mfd/wm8994-core.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/mfd/wm8994-core.c b/drivers/mfd/wm8994-core.c
index a89221bffde5..c419ab0c0eae 100644
--- a/drivers/mfd/wm8994-core.c
+++ b/drivers/mfd/wm8994-core.c
@@ -279,20 +279,11 @@ static int wm8994_set_pdata_from_of(struct wm8994 *wm8994)
of_property_read_u32_array(np, "wlf,micbias-cfg", pdata->micbias,
ARRAY_SIZE(pdata->micbias));
- pdata->lineout1_diff = true;
- pdata->lineout2_diff = true;
- if (of_find_property(np, "wlf,lineout1-se", NULL))
- pdata->lineout1_diff = false;
- if (of_find_property(np, "wlf,lineout2-se", NULL))
- pdata->lineout2_diff = false;
-
- if (of_find_property(np, "wlf,lineout1-feedback", NULL))
- pdata->lineout1fb = true;
- if (of_find_property(np, "wlf,lineout2-feedback", NULL))
- pdata->lineout2fb = true;
-
- if (of_find_property(np, "wlf,ldoena-always-driven", NULL))
- pdata->lineout2fb = true;
+ pdata->lineout1_diff = !of_property_read_bool(np, "wlf,lineout1-se");
+ pdata->lineout2_diff = !of_property_read_bool(np, "wlf,lineout2-se");
+ pdata->lineout1fb = of_property_read_bool(np, "wlf,lineout1-feedback");
+ pdata->lineout2fb = of_property_read_bool(np, "wlf,lineout2-feedback") ||
+ of_property_read_bool(np, "wlf,ldoena-always-driven");
pdata->spkmode_pu = of_property_read_bool(np, "wlf,spkmode-pu");