diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 17:47:31 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-11 15:18:54 +0300 |
commit | 1e108e60a44a924e3666fa2a10b53f6c31522856 (patch) | |
tree | 6dc8938b5b7f0f678ea0a9ba0974341b45eceb5c /sound/soc/generic/audio-graph-card2.c | |
parent | 75034eb5e4c267d4ab93085b5d6fa3dab2535b34 (diff) | |
download | linux-1e108e60a44a924e3666fa2a10b53f6c31522856.tar.xz |
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/generic/audio-graph-card2.c')
-rw-r--r-- | sound/soc/generic/audio-graph-card2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/generic/audio-graph-card2.c b/sound/soc/generic/audio-graph-card2.c index 06609a526b78..259544f64df9 100644 --- a/sound/soc/generic/audio-graph-card2.c +++ b/sound/soc/generic/audio-graph-card2.c @@ -376,7 +376,7 @@ static int graph_get_dai_id(struct device_node *ep) * only of_graph_parse_endpoint(). * We need to check "reg" property */ - if (of_get_property(ep, "reg", NULL)) + if (of_property_present(ep, "reg")) return info.id; node = of_get_parent(ep); |