diff mbox series

[2/2] ASoC: soc-core: fix remaining of_property_read_bool usage

Message ID 20250325213455.3952361-2-m.felsch@pengutronix.de (mailing list archive)
State New
Headers show
Series [1/2] ASoC: soc-core: fix bitclock-master and frame-master present check | expand

Commit Message

Marco Felsch March 25, 2025, 9:34 p.m. UTC
Replace the of_property_read_bool() by of_property_present() to avoid
warnings which are triggered since commit c141ecc3cecd ("of: Warn when
of_property_read_bool() is used on non-boolean properties").

Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
---
 sound/soc/soc-core.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 1e0cdd778a3b..34dc24e07336 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3046,7 +3046,7 @@  int snd_soc_of_parse_pin_switches(struct snd_soc_card *card, const char *prop)
 	unsigned int i, nb_controls;
 	int ret;
 
-	if (!of_property_read_bool(dev->of_node, prop))
+	if (!of_property_present(dev->of_node, prop))
 		return 0;
 
 	strings = devm_kcalloc(dev, nb_controls_max,
@@ -3120,7 +3120,7 @@  int snd_soc_of_parse_tdm_slot(struct device_node *np,
 	if (rx_mask)
 		snd_soc_of_get_slot_mask(np, "dai-tdm-slot-rx-mask", rx_mask);
 
-	if (of_property_read_bool(np, "dai-tdm-slot-num")) {
+	if (of_property_present(np, "dai-tdm-slot-num")) {
 		ret = of_property_read_u32(np, "dai-tdm-slot-num", &val);
 		if (ret)
 			return ret;
@@ -3129,7 +3129,7 @@  int snd_soc_of_parse_tdm_slot(struct device_node *np,
 			*slots = val;
 	}
 
-	if (of_property_read_bool(np, "dai-tdm-slot-width")) {
+	if (of_property_present(np, "dai-tdm-slot-width")) {
 		ret = of_property_read_u32(np, "dai-tdm-slot-width", &val);
 		if (ret)
 			return ret;