aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-core.c')
-rw-r--r--sound/soc/soc-core.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 3d803f3cd272..448d4a7c09dd 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -983,7 +983,9 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num, int order)
983 } 983 }
984 cpu_dai->probed = 0; 984 cpu_dai->probed = 0;
985 list_del(&cpu_dai->card_list); 985 list_del(&cpu_dai->card_list);
986 module_put(cpu_dai->dev->driver->owner); 986
987 if (!cpu_dai->codec)
988 module_put(cpu_dai->dev->driver->owner);
987 } 989 }
988} 990}
989 991
@@ -1257,11 +1259,13 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num, int order)
1257 /* probe the cpu_dai */ 1259 /* probe the cpu_dai */
1258 if (!cpu_dai->probed && 1260 if (!cpu_dai->probed &&
1259 cpu_dai->driver->probe_order == order) { 1261 cpu_dai->driver->probe_order == order) {
1260 cpu_dai->dapm.card = card; 1262 if (!cpu_dai->codec) {
1261 if (!try_module_get(cpu_dai->dev->driver->owner)) 1263 cpu_dai->dapm.card = card;
1262 return -ENODEV; 1264 if (!try_module_get(cpu_dai->dev->driver->owner))
1265 return -ENODEV;
1263 1266
1264 snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai); 1267 snd_soc_dapm_new_dai_widgets(&cpu_dai->dapm, cpu_dai);
1268 }
1265 1269
1266 if (cpu_dai->driver->probe) { 1270 if (cpu_dai->driver->probe) {
1267 ret = cpu_dai->driver->probe(cpu_dai); 1271 ret = cpu_dai->driver->probe(cpu_dai);