SoC: dma-sh7760: Fix compile error
PATCH 1/1 SoC: dma-sh7760: Fix compile error
The dma-sh7760 currently fails with the following compile error:
sound/soc/sh/dma-sh7760.c:346:2: error: unknown field 'pcm_ops' specified in initializer sound/soc/sh/dma-sh7760.c:346:2: warning: initialization from incompatible pointer type sound/soc/sh/dma-sh7760.c:347:2: error: unknown field 'pcm_new' specified in initializer sound/soc/sh/dma-sh7760.c:347:2: warning: initialization makes integer from pointer without a cast sound/soc/sh/dma-sh7760.c:348:2: error: unknown field 'pcm_free' specified in initializer sound/soc/sh/dma-sh7760.c:348:2: warning: initialization from incompatible pointer type sound/soc/sh/dma-sh7760.c: In function 'sh7760_soc_platform_probe':
sound/soc/sh/dma-sh7760.c:353:2: warning: passing argument 2 of 'snd_soc_register_platform' from incompatible pointer type include/sound/soc.h:368:5: note: expected 'struct snd_soc_platform_driver *' but argument is of type 'struct snd_soc_platform *'
This is due the misnaming of the snd_soc_platform_driver type name and 'ops' field. The issue was introduced in commit f0fba2a("ASoC: multi-component - ASoC Multi-Component Support").
---
Given that nobody noticed this over the course of the last three years the code is probably pretty dead by now anyway.
--- sound/soc/sh/dma-sh7760.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/sh/dma-sh7760.c +2 -2
@@ -342,8 +342,8 @@ static int camelot_pcm_new(struct snd_soc_pcm_runtime *rtd)return 0 ; } -static struct snd_soc_platform sh7760_soc_platform = { - .pcm_ops = &camelot_pcm_ops, +static struct snd_soc_platform_driver sh7760_soc_platform = { + .ops = &camelot_pcm_ops, .pcm_new = camelot_pcm_new, .pcm_free = camelot_pcm_free, };
Signature · 1 line
1.8.0
Sorry for the hiccup in patch subject, the prefix should have of course been "ASoC"
Quoted 16 lines · Lars-Peter Clausen
The dma-sh7760 currently fails with the following compile error:
sound/soc/sh/dma-sh7760.c:346:2: error: unknown field 'pcm_ops' specified in initializersound/soc/sh/dma-sh7760.c:346:2: warning: initialization from incompatible pointer typesound/soc/sh/dma-sh7760.c:347:2: error: unknown field 'pcm_new' specified in initializersound/soc/sh/dma-sh7760.c:347:2: warning: initialization makes integer from pointer without a castsound/soc/sh/dma-sh7760.c:348:2: error: unknown field 'pcm_free' specified in initializersound/soc/sh/dma-sh7760.c:348:2: warning: initialization from incompatible pointer typesound/soc/sh/dma-sh7760.c: In function 'sh7760_soc_platform_probe':
sound/soc/sh/dma-sh7760.c:353:2: warning: passing argument 2 of 'snd_soc_register_platform' from incompatible pointer typeinclude/sound/soc.h:368:5: note: expected 'structsnd_soc_platform_driver*' but argument is of type 'structsnd_soc_platform*'This is due the misnaming of the
snd_soc_platform_drivertype name and 'ops' field. The issue was introduced in commitf0fba2a("ASoC: multi-component - ASoC Multi-Component Support").Signed-off-by Lars-Peter Clausen <[email protected]>
Mark Brown
AppliedQuoted 2 lines · Lars-Peter Clausen
The dma-sh7760 currently fails with the following compile error:
sound/soc/sh/dma-sh7760.c:346:2: error: unknown field 'pcm_ops' specified in initializer
Applied, thanks.