summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorAlan Tull <alan.tull@freescale.com>2011-10-26 13:13:47 -0500
committerAlan Tull <alan.tull@freescale.com>2011-10-27 11:22:33 -0500
commit9609728fd3e7f114810098e265810cf2ea269282 (patch)
tree35d5a8c796b0667bea1912bd66aee738137dcb21 /sound
parent06566f66129d93ee270492089a0bbff8878562f5 (diff)
ENGR00160862 unique id for each soc-audio device
On boards which have more than one soc-audio device, the initialization of the first device will create a sysfs directory named /sys/devices/platform/soc-audio and subsequent soc-audio devices will fail to init because they try to create another sysfs directory of the same name. The solution is to have a unique number for each device such that different boards having combinations will be OK. Signed-off-by: Alan Tull <alan.tull@freescale.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/imx/imx-sgtl5000.c2
-rw-r--r--sound/soc/imx/imx-spdif.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/imx/imx-sgtl5000.c b/sound/soc/imx/imx-sgtl5000.c
index b59abf20d085..0ebc6001ede1 100644
--- a/sound/soc/imx/imx-sgtl5000.c
+++ b/sound/soc/imx/imx-sgtl5000.c
@@ -368,7 +368,7 @@ static int __init imx_sgtl5000_init(void)
else
imx_sgtl5000_dai[0].codec_name = "sgtl5000.1-000a";
- imx_sgtl5000_snd_device = platform_device_alloc("soc-audio", -1);
+ imx_sgtl5000_snd_device = platform_device_alloc("soc-audio", 1);
if (!imx_sgtl5000_snd_device)
return -ENOMEM;
diff --git a/sound/soc/imx/imx-spdif.c b/sound/soc/imx/imx-spdif.c
index 885d8d58aee8..efee7696bfbb 100644
--- a/sound/soc/imx/imx-spdif.c
+++ b/sound/soc/imx/imx-spdif.c
@@ -113,7 +113,7 @@ static int __init imx_spdif_init(void)
return -ENOMEM;
}
- imx_spdif_snd_device = platform_device_alloc("soc-audio", -1);
+ imx_spdif_snd_device = platform_device_alloc("soc-audio", 3);
if (!imx_spdif_snd_device) {
pr_err("%s - failed platform_device_alloc\n", __func__);
return -ENOMEM;