[PATCH 1/2] ASoC: soc-core: fix bitclock-master and frame-master present check

From: Marco Felsch
Date: Tue Mar 25 2025 - 17:38:16 EST


To check for a none boolean property of_property_present() should be
used instead of of_property_read_bool(). The later returns a warning
since commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used
on non-boolean properties").

Fixes: 69dd15a8ef0a ("ASoC: Use of_property_read_bool()")
Signed-off-by: Marco Felsch <m.felsch@xxxxxxxxxxxxxx>
---
sound/soc/soc-core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 3c6d8aef4130..1e0cdd778a3b 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3403,12 +3403,12 @@ unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np,
* check "[prefix]frame-master"
*/
snprintf(prop, sizeof(prop), "%sbitclock-master", prefix);
- bit = of_property_read_bool(np, prop);
+ bit = of_property_present(np, prop);
if (bit && bitclkmaster)
*bitclkmaster = of_parse_phandle(np, prop, 0);

snprintf(prop, sizeof(prop), "%sframe-master", prefix);
- frame = of_property_read_bool(np, prop);
+ frame = of_property_present(np, prop);
if (frame && framemaster)
*framemaster = of_parse_phandle(np, prop, 0);

--
2.39.5