]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ASoC: core: Log a warning when machines use soc-audio
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 2 Mar 2012 13:07:41 +0000 (13:07 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Fri, 2 Mar 2012 16:21:25 +0000 (16:21 +0000)
snd_soc_register_card() has been available and strongly preferred since
2.6.38 but we're still seeing new drivers using it and the conversion rate
for older machines has been low. Help address both issues by logging a
warning when the soc-audio device probes.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@ti.com>
sound/soc/soc-core.c

index 29dbbd793fc6267796e1f3a68109fa5295bb661d..7978f6c01ef73ebf870519ab9f8ea410ba810722 100644 (file)
@@ -1645,6 +1645,10 @@ static int soc_probe(struct platform_device *pdev)
        if (!card)
                return -EINVAL;
 
+       dev_warn(&pdev->dev,
+                "ASoC machine %s should use snd_soc_register_card()\n",
+                card->name);
+
        /* Bodge while we unpick instantiation */
        card->dev = &pdev->dev;