Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: Use of_property_present() for non-boolean properties

The use of of_property_read_bool() for non-boolean properties is
deprecated in favor of of_property_present() when testing for property
presence.

Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Link: https://patch.msgid.link/20250109182303.3973082-1-robh@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Rob Herring (Arm) and committed by
Mark Brown
84eac6d4 7e24ec93

+13 -13
+1 -1
sound/soc/fsl/fsl-asoc-card.c
··· 932 932 if (!asrc_pdev) 933 933 priv->card.num_dapm_routes /= 2; 934 934 935 - if (of_property_read_bool(np, "audio-routing")) { 935 + if (of_property_present(np, "audio-routing")) { 936 936 ret = snd_soc_of_parse_audio_routing(&priv->card, "audio-routing"); 937 937 if (ret) { 938 938 dev_err(&pdev->dev, "failed to parse audio-routing: %d\n", ret);
+1 -1
sound/soc/fsl/imx-audmux.c
··· 237 237 child); 238 238 continue; 239 239 } 240 - if (!of_property_read_bool(child, "fsl,port-config")) { 240 + if (!of_property_present(child, "fsl,port-config")) { 241 241 dev_warn(&pdev->dev, "child node \"%pOF\" does not have property fsl,port-config\n", 242 242 child); 243 243 continue;
+1 -1
sound/soc/fsl/imx-card.c
··· 529 529 } 530 530 531 531 /* DAPM routes */ 532 - if (of_property_read_bool(dev->of_node, "audio-routing")) { 532 + if (of_property_present(dev->of_node, "audio-routing")) { 533 533 ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); 534 534 if (ret) 535 535 return ret;
+1 -1
sound/soc/fsl/imx-rpmsg.c
··· 218 218 if (ret) 219 219 goto fail; 220 220 221 - if (of_property_read_bool(np, "audio-routing")) { 221 + if (of_property_present(np, "audio-routing")) { 222 222 ret = snd_soc_of_parse_audio_routing(&data->card, "audio-routing"); 223 223 if (ret) { 224 224 dev_err(&pdev->dev, "failed to parse audio-routing: %d\n", ret);
+2 -2
sound/soc/generic/simple-card-utils.c
··· 713 713 714 714 snprintf(prop, sizeof(prop), "%s%s", prefix, "routing"); 715 715 716 - if (!of_property_read_bool(node, prop)) 716 + if (!of_property_present(node, prop)) 717 717 return 0; 718 718 719 719 return snd_soc_of_parse_audio_routing(card, prop); ··· 731 731 732 732 snprintf(prop, sizeof(prop), "%s%s", prefix, "widgets"); 733 733 734 - if (of_property_read_bool(node, prop)) 734 + if (of_property_present(node, prop)) 735 735 return snd_soc_of_parse_audio_simple_widgets(card, prop); 736 736 737 737 /* no widgets is not error */
+1 -1
sound/soc/intel/keembay/kmb_platform.c
··· 869 869 870 870 kmb_i2s->fifo_th = (1 << COMP1_FIFO_DEPTH(comp1_reg)) / 2; 871 871 872 - kmb_i2s->use_pio = !(of_property_read_bool(np, "dmas")); 872 + kmb_i2s->use_pio = !of_property_present(np, "dmas"); 873 873 874 874 if (kmb_i2s->use_pio) { 875 875 irq = platform_get_irq_optional(pdev, 0);
+2 -2
sound/soc/mediatek/common/mtk-soundcard-driver.c
··· 221 221 card->name = pdata->card_name; 222 222 } 223 223 224 - needs_legacy_probe = !of_property_read_bool(pdev->dev.of_node, "audio-routing"); 224 + needs_legacy_probe = !of_property_present(pdev->dev.of_node, "audio-routing"); 225 225 if (needs_legacy_probe) { 226 226 /* 227 227 * If we have no .soc_probe() callback there's no way of using ··· 262 262 adsp_node = NULL; 263 263 264 264 if (adsp_node) { 265 - if (of_property_read_bool(pdev->dev.of_node, "mediatek,dai-link")) { 265 + if (of_property_present(pdev->dev.of_node, "mediatek,dai-link")) { 266 266 ret = mtk_sof_dailink_parse_of(card, pdev->dev.of_node, 267 267 "mediatek,dai-link", 268 268 card->dai_link, card->num_links);
+3 -3
sound/soc/qcom/common.c
··· 44 44 return ret; 45 45 } 46 46 47 - if (of_property_read_bool(dev->of_node, "widgets")) { 47 + if (of_property_present(dev->of_node, "widgets")) { 48 48 ret = snd_soc_of_parse_audio_simple_widgets(card, "widgets"); 49 49 if (ret) 50 50 return ret; 51 51 } 52 52 53 53 /* DAPM routes */ 54 - if (of_property_read_bool(dev->of_node, "audio-routing")) { 54 + if (of_property_present(dev->of_node, "audio-routing")) { 55 55 ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); 56 56 if (ret) 57 57 return ret; 58 58 } 59 59 /* Deprecated, only for compatibility with old device trees */ 60 - if (of_property_read_bool(dev->of_node, "qcom,audio-routing")) { 60 + if (of_property_present(dev->of_node, "qcom,audio-routing")) { 61 61 ret = snd_soc_of_parse_audio_routing(card, "qcom,audio-routing"); 62 62 if (ret) 63 63 return ret;
+1 -1
sound/soc/qcom/sc7180.c
··· 513 513 card->controls = sc7180_snd_controls; 514 514 card->num_controls = ARRAY_SIZE(sc7180_snd_controls); 515 515 516 - if (of_property_read_bool(dev->of_node, "dmic-gpios")) { 516 + if (of_property_present(dev->of_node, "dmic-gpios")) { 517 517 card->dapm_widgets = sc7180_snd_dual_mic_widgets, 518 518 card->num_dapm_widgets = ARRAY_SIZE(sc7180_snd_dual_mic_widgets), 519 519 card->controls = sc7180_snd_dual_mic_controls,