From 0f9141c974b2dc29b7d1cf245bbf4685350521be Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 12 Oct 2010 15:43:21 +0100 Subject: [PATCH] ASoC: Pay attention to driver supplied DAI IDs The driver can specify a DAI ID number so use that. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- sound/soc/soc-core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 6cee97e..63c80e6 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -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; -- 2.7.4