Message ID | 20250325213455.3952361-1-m.felsch@pengutronix.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/2] ASoC: soc-core: fix bitclock-master and frame-master present check | expand |
On Tue, Mar 25, 2025 at 10:34:53PM +0100, Marco Felsch wrote: > To check for a none boolean property of_property_present() should be > used instead of of_property_read_bool(). The later returns a warning > since commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used > on non-boolean properties"). This doesn't apply against current code, please check and resend.
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3c6d8aef4130..1e0cdd778a3b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3403,12 +3403,12 @@ unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np, * check "[prefix]frame-master" */ snprintf(prop, sizeof(prop), "%sbitclock-master", prefix); - bit = of_property_read_bool(np, prop); + bit = of_property_present(np, prop); if (bit && bitclkmaster) *bitclkmaster = of_parse_phandle(np, prop, 0); snprintf(prop, sizeof(prop), "%sframe-master", prefix); - frame = of_property_read_bool(np, prop); + frame = of_property_present(np, prop); if (frame && framemaster) *framemaster = of_parse_phandle(np, prop, 0);
To check for a none boolean property of_property_present() should be used instead of of_property_read_bool(). The later returns a warning since commit c141ecc3cecd ("of: Warn when of_property_read_bool() is used on non-boolean properties"). Fixes: 69dd15a8ef0a ("ASoC: Use of_property_read_bool()") Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> --- sound/soc/soc-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)