]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 22 Jan 2025 08:21:27 +0000 (09:21 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 May 2025 07:41:46 +0000 (09:41 +0200)
commit5626b47a3e7240139fb22ba925cd7866f7105e64
treeccb8cf6b6eb5b08179c951143b37aef8aacddc4b
parent79ff5e26295640d5b2b8767eeafe49b6e064ab8c
ASoC: soc-core: Stop using of_property_read_bool() for non-boolean properties

[ Upstream commit 6eab7034579917f207ca6d8e3f4e11e85e0ab7d5 ]

On R-Car:

    OF: /sound: Read of boolean property 'simple-audio-card,bitclock-master' with a value.
    OF: /sound: Read of boolean property 'simple-audio-card,frame-master' with a value.

or:

    OF: /soc/sound@ec500000/ports/port@0/endpoint: Read of boolean property 'bitclock-master' with a value.
    OF: /soc/sound@ec500000/ports/port@0/endpoint: Read of boolean property 'frame-master' with a value.

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

Replace testing for presence before calling of_property_read_u32() by
testing for an -EINVAL return value from the latter, to simplify the
code.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://patch.msgid.link/db10e96fbda121e7456d70e97a013cbfc9755f4d.1737533954.git.geert+renesas@glider.be
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
sound/soc/soc-core.c