aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/sound/soc/mxs
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2023-03-10 08:47:31 -0600
committerMark Brown <broonie@kernel.org>2023-03-11 12:18:54 +0000
commit1e108e60a44a924e3666fa2a10b53f6c31522856 (patch)
tree6dc8938b5b7f0f678ea0a9ba0974341b45eceb5c /sound/soc/mxs
parentASoC: SOF: Intel: MTL: Don't access EM2 (diff)
downloadwireguard-linux-1e108e60a44a924e3666fa2a10b53f6c31522856.tar.xz
wireguard-linux-1e108e60a44a924e3666fa2a10b53f6c31522856.zip
ASoC: Use of_property_present() for testing DT property presence
It is preferred to use typed property access functions (i.e. of_property_read_<type> functions) rather than low-level of_get_property/of_find_property functions for reading properties. As part of this, convert of_get_property/of_find_property calls to the recently added of_property_present() helper when we just want to test for presence of a property and nothing more. Signed-off-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20230310144732.1546328-1-robh@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/mxs')
-rw-r--r--sound/soc/mxs/mxs-sgtl5000.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
index 746f40938675..a55e7256a4c3 100644
--- a/sound/soc/mxs/mxs-sgtl5000.c
+++ b/sound/soc/mxs/mxs-sgtl5000.c
@@ -150,7 +150,7 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
card->dev = &pdev->dev;
- if (of_find_property(np, "audio-routing", NULL)) {
+ if (of_property_present(np, "audio-routing")) {
card->dapm_widgets = mxs_sgtl5000_dapm_widgets;
card->num_dapm_widgets = ARRAY_SIZE(mxs_sgtl5000_dapm_widgets);