summaryrefslogtreecommitdiff
path: root/sound/soc/soc-component.c
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@linaro.org>2021-01-29 10:05:39 +0000
committerMark Brown <broonie@kernel.org>2021-01-29 12:40:06 +0000
commit8ac9e476b86851c94e0f33bea758e0a00e3f875e (patch)
tree81740c06a7e0f96a6ef51fa4888b95ece2479b96 /sound/soc/soc-component.c
parent2029d73d4d656068695197bf72f324af2419ed64 (diff)
ASoC: soc-component: fix undefined reference to __ffssi2
microblaze-linux-gcc (GCC) 9.3.0 complains about missing __ffssi2 symbol while using __builtin_ffs at runtime. This is because arch/h8300 is compiled with -fno-builtin option. so fallback and use kernel ffs() instead to all the arch builds happy! Fixes: 1da0b9899abd ("ASoC: soc-component: add snd_soc_component_read/write_field()") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20210129100539.23459-1-srinivas.kandagatla@linaro.org Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/soc-component.c')
-rw-r--r--sound/soc/soc-component.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/soc-component.c b/sound/soc/soc-component.c
index 361a79d655e3..159bf88b9f8c 100644
--- a/sound/soc/soc-component.c
+++ b/sound/soc/soc-component.c
@@ -11,6 +11,7 @@
#include <linux/module.h>
#include <linux/pm_runtime.h>
#include <sound/soc.h>
+#include <linux/bitops.h>
#define soc_component_ret(dai, ret) _soc_component_ret(dai, __func__, ret)
static inline int _soc_component_ret(struct snd_soc_component *component,
@@ -43,7 +44,7 @@ static inline int soc_component_field_shift(struct snd_soc_component *component,
return 0;
}
- return (__builtin_ffs(mask) - 1);
+ return (ffs(mask) - 1);
}
/*