diff options
author | Rob Herring <robh@kernel.org> | 2023-03-10 15:47:31 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-03-11 13:18:54 +0100 |
commit | 1e108e60a44a924e3666fa2a10b53f6c31522856 (patch) | |
tree | 6dc8938b5b7f0f678ea0a9ba0974341b45eceb5c /sound/soc/samsung | |
parent | ASoC: SOF: Intel: MTL: Don't access EM2 (diff) | |
download | linux-1e108e60a44a924e3666fa2a10b53f6c31522856.tar.xz 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/samsung')
-rw-r--r-- | sound/soc/samsung/i2s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/samsung/i2s.c b/sound/soc/samsung/i2s.c index 6f96032090de..083e278aa021 100644 --- a/sound/soc/samsung/i2s.c +++ b/sound/soc/samsung/i2s.c @@ -1289,7 +1289,7 @@ static int i2s_register_clock_provider(struct samsung_i2s_priv *priv) int ret, i; /* Register the clock provider only if it's expected in the DTB */ - if (!of_find_property(dev->of_node, "#clock-cells", NULL)) + if (!of_property_present(dev->of_node, "#clock-cells")) return 0; /* Get the RCLKSRC mux clock parent clock names */ |