ASoC: omap-mcbsp: Only print warning if the st_data is missing for the port
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Wed, 22 Aug 2012 10:11:41 +0000 (13:11 +0300)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Sat, 25 Aug 2012 20:30:19 +0000 (13:30 -0700)
When asked to add the ST controls warn only if the st_data is missing.
In this way we do not block the otherwise functional card to probe.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/omap/omap-mcbsp.c

index 20d30c9ae573a43a8155b77ea66449c576a2fa92..c1f466e1b8b6516359beeef96343bf5d018fe1bf 100644 (file)
@@ -719,8 +719,10 @@ int omap_mcbsp_st_add_controls(struct snd_soc_pcm_runtime *rtd)
        struct snd_soc_dai *cpu_dai = rtd->cpu_dai;
        struct omap_mcbsp *mcbsp = snd_soc_dai_get_drvdata(cpu_dai);
 
-       if (!mcbsp->st_data)
-               return -ENODEV;
+       if (!mcbsp->st_data) {
+               dev_warn(mcbsp->dev, "No sidetone data for port\n");
+               return 0;
+       }
 
        switch (mcbsp->id) {
        case 2: /* McBSP 2 */