From 770d84968e0c5280d24ff0ee14a6c5b4aac0635f Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 8 Jun 2012 12:34:20 -0600 Subject: [PATCH] --- yaml --- r: 316243 b: refs/heads/master c: a9db7dbee0436f0c741c6dfb39ab0241d4131539 h: refs/heads/master i: 316241: 33e34703664bebbe2b62fdeba2848edc495a9993 316239: 0f074a94bb384e554f809fe7f81c69a70555e9ea v: v3 --- [refs] | 2 +- trunk/sound/soc/soc-core.c | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 0044eb879064..5d7e2a310a86 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b883f363495f3d2e237170f6b8814869a3dd16fe +refs/heads/master: a9db7dbee0436f0c741c6dfb39ab0241d4131539 diff --git a/trunk/sound/soc/soc-core.c b/trunk/sound/soc/soc-core.c index 3d803f3cd272..448d4a7c09dd 100644 --- a/trunk/sound/soc/soc-core.c +++ b/trunk/sound/soc/soc-core.c @@ -983,7 +983,9 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num, int order) } cpu_dai->probed = 0; list_del(&cpu_dai->card_list); - module_put(cpu_dai->dev->driver->owner); + + if (!cpu_dai->codec) + module_put(cpu_dai->dev->driver->owner); } } @@ -1257,11 +1259,13 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num, int order) /* probe the cpu_dai */ if (!cpu_dai->probed && cpu_dai->driver->probe_order == order) { - cpu_dai->dapm.card = card; - if (!try_module_get(cpu_dai->dev->driver->owner)) - return -ENODEV; + if (!cpu_dai->codec) { + cpu_dai->dapm.card = card; + if (!try_module_get(cpu_dai->dev->driver->owner)) + return -ENODEV; - snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai); + snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai); + } if (cpu_dai->driver->probe) { ret = cpu_dai->driver->probe(cpu_dai);