]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
ASoC: Pay attention to driver supplied DAI IDs
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 12 Oct 2010 14:43:21 +0000 (15:43 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 13 Oct 2010 10:02:43 +0000 (11:02 +0100)
The driver can specify a DAI ID number so use that.

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

index 6cee97e23da67c453013de5ddf760186744b9a71..63c80e634a37cd858966ae85d27308813fb3f9af 100644 (file)
@@ -3051,8 +3051,11 @@ int snd_soc_register_dais(struct device *dev,
                }
 
                dai->dev = dev;
-               dai->id = i;
                dai->driver = &dai_drv[i];
+               if (dai->driver->id)
+                       dai->id = dai->driver->id;
+               else
+                       dai->id = i;
                if (!dai->driver->ops)
                        dai->driver->ops = &null_dai_ops;