From: Peter Ujfalusi Date: Wed, 22 Aug 2012 10:11:40 +0000 (+0300) Subject: ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controls X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=28739dfcffaad629b28cbab947193b259f745ea9;p=linux-beck.git ASoC: omap-mcbsp: Check mcbsp->id instead of cpu_dai->id when adding ST controls In ddevice tree booted kernel all device have unique name and their device id is set to 0. Use the mcbsp->id for checking to decide which control set we should add for McBSP sidetone handling. Signed-off-by: Peter Ujfalusi Acked-by: Jarkko Nikula Signed-off-by: Mark Brown --- diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c index 2e1750e2ab31..20d30c9ae573 100644 --- a/sound/soc/omap/omap-mcbsp.c +++ b/sound/soc/omap/omap-mcbsp.c @@ -722,7 +722,7 @@ int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd) if (!mcbsp->st_data) return -ENODEV; - switch (cpu_dai->id) { + switch (mcbsp->id) { case 2: /* McBSP 2 */ return snd_soc_add_dai_controls(cpu_dai, omap_mcbsp2_st_controls,