[PATCH v2 07/11] ASoC: samsung: odroid: use of_property_present to check for property

From: Krzysztof Kozlowski
Date: Thu Aug 10 2023 - 02:33:33 EST


"samsung,audio-widgets" and "samsung,audio-routing" are not boolean
properties, thus more appropriate is to use of_property_present() to
check if they are present.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxx>
---
sound/soc/samsung/odroid.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/samsung/odroid.c b/sound/soc/samsung/odroid.c
index a5442592bde4..1743bd55ba1a 100644
--- a/sound/soc/samsung/odroid.c
+++ b/sound/soc/samsung/odroid.c
@@ -223,14 +223,14 @@ static int odroid_audio_probe(struct platform_device *pdev)
if (ret < 0)
return ret;

- if (of_property_read_bool(dev->of_node, "samsung,audio-widgets")) {
+ if (of_property_present(dev->of_node, "samsung,audio-widgets")) {
ret = snd_soc_of_parse_audio_simple_widgets(card,
"samsung,audio-widgets");
if (ret < 0)
return ret;
}

- if (of_property_read_bool(dev->of_node, "samsung,audio-routing")) {
+ if (of_property_present(dev->of_node, "samsung,audio-routing")) {
ret = snd_soc_of_parse_audio_routing(card,
"samsung,audio-routing");
if (ret < 0)
--
2.34.1