]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00160862 unique id for each soc-audio device
authorAlan Tull <alan.tull@freescale.com>
Wed, 26 Oct 2011 18:13:47 +0000 (13:13 -0500)
committerOliver Wendt <ow@karo-electronics.de>
Mon, 30 Sep 2013 12:09:48 +0000 (14:09 +0200)
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>
sound/soc/imx/imx-sgtl5000.c
sound/soc/imx/imx-spdif.c

index b59abf20d0857de128547b921f4130c97e348f27..0ebc6001ede1381673b26039ccb9f5b70b1e1c49 100644 (file)
@@ -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;
 
index 885d8d58aee88373ceaea8fa0a29b1dfadf54812..efee7696bfbb06b54d2f3bec17177f47df66f098 100644 (file)
@@ -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;