From 23b64e9b9ba2feb1884386042ddbc4872aeab31b Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Thu, 23 Jul 2026 06:34:20 +0000 Subject: [PATCH] ASoC: soc-component: move soc_component_field_shift() soc_component_field_shift() is used from snd_soc_component_{read/write}_field(). It is better to located around them. Signed-off-by: Kuninori Morimoto Reviewed-by: Cezary Rojewski Link: https://patch.msgid.link/87wlumrz83.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown --- sound/soc/soc-component.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c index 2ce24513fac5..7fbd6a711ed8 100644 --- a/sound/soc/soc-component.c +++ b/sound/soc/soc-component.c @@ -29,18 +29,6 @@ static inline int _soc_component_ret_reg_rw(struct snd_soc_component *component, func, component->name, reg); } -static inline int soc_component_field_shift(struct snd_soc_component *component, - unsigned int mask) -{ - if (!mask) { - dev_err(component->dev, "ASoC: error field mask is zero for %s\n", - component->name); - return 0; - } - - return (ffs(mask) - 1); -} - /* * We might want to check substream by using list. * In such case, we can update these macros. @@ -820,6 +808,18 @@ int snd_soc_component_update_bits_async(struct snd_soc_component *component, } EXPORT_SYMBOL_GPL(snd_soc_component_update_bits_async); +static inline int soc_component_field_shift(struct snd_soc_component *component, + unsigned int mask) +{ + if (!mask) { + dev_err(component->dev, "ASoC: error field mask is zero for %s\n", + component->name); + return 0; + } + + return (ffs(mask) - 1); +} + /** * snd_soc_component_read_field() - Read register field value * @component: Component to read from