Message ID | 20250205120128.1080295-1-festevam@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | ASoC: soc-core: Use of_property_present() for non-boolean properties | expand |
On Wed, Feb 05, 2025 at 09:01:28AM -0300, Fabio Estevam wrote: > From: Fabio Estevam <festevam@denx.de> > > The use of of_property_read_bool() for non-boolean properties is > deprecated in favor of of_property_present() when testing for property > presence. This doesn't apply against current code, please check and resend.
On Wed, Feb 5, 2025 at 9:45 AM Mark Brown <broonie@kernel.org> wrote:
> This doesn't apply against current code, please check and resend.
I used today's linux-next. Which tree would you like me to use?
On Wed, Feb 5, 2025 at 9:50 AM Fabio Estevam <festevam@gmail.com> wrote: > > On Wed, Feb 5, 2025 at 9:45 AM Mark Brown <broonie@kernel.org> wrote: > > > This doesn't apply against current code, please check and resend. > > I used today's linux-next. Which tree would you like me to use? Ah, just realized that Geert has submitted a fix that landed in your for-next tree: https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git/commit/?id=6eab7034579917f207ca6d8e3f4e11e85e0ab7d5
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 3c6d8aef4130..2c529210a8e0 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -3120,7 +3120,7 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, if (rx_mask) snd_soc_of_get_slot_mask(np, "dai-tdm-slot-rx-mask", rx_mask); - if (of_property_read_bool(np, "dai-tdm-slot-num")) { + if (of_property_present(np, "dai-tdm-slot-num")) { ret = of_property_read_u32(np, "dai-tdm-slot-num", &val); if (ret) return ret; @@ -3129,7 +3129,7 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np, *slots = val; } - if (of_property_read_bool(np, "dai-tdm-slot-width")) { + if (of_property_present(np, "dai-tdm-slot-width")) { ret = of_property_read_u32(np, "dai-tdm-slot-width", &val); if (ret) return ret; @@ -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);