sound: soc/samsung: i2s: Init clock hierarchy only for audio subsystem
authorTomasz Figa <t.figa@samsung.com>
Wed, 8 Jan 2014 13:03:43 +0000 (14:03 +0100)
committerChanho Park <chanho61.park@samsung.com>
Thu, 7 Aug 2014 06:17:56 +0000 (15:17 +0900)
Clock hierarchy needs to be initialized only for I2S that is a part of
Audio Subsystem. Remaining I2S do not need this, so this patch makes the
initialization conditional, based on presence of secondary DAI, which is
present only in Audio Subsystem I2S block.

Signed-off-by: Tomasz Figa <t.figa@samsung.com>
sound/soc/samsung/i2s.c

index 54df6db..d7e4006 100644 (file)
@@ -993,11 +993,13 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
                return -ENXIO;
        }
 
-       /* Set clock hierarchy for audio subsystem */
-       ret = clk_set_hierarchy(i2s);
-       if (ret) {
-               dev_err(&i2s->pdev->dev, "failed to set clock hierachy.\n");
-               return ret;
+       if (i2s->quirks & QUIRK_SEC_DAI) {
+               /* Set clock hierarchy for audio subsystem */
+               ret = clk_set_hierarchy(i2s);
+               if (ret) {
+                       dev_err(&i2s->pdev->dev, "failed to set clock hierachy.\n");
+                       return ret;
+               }
        }
 
        if (other) {