Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230461
b: refs/heads/master
c: f6c2ed5
h: refs/heads/master
i:
  230459: 7ac9b70
v: v3
  • Loading branch information
Harsha Priya authored and Mark Brown committed Jan 5, 2011
1 parent df4a675 commit 215efc5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5e79d64b038ae0039663f721f4b9f5ce1951d9da
refs/heads/master: f6c2ed5dd6ab43447dacc136585fc894e3f3a82d
14 changes: 7 additions & 7 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1259,9 +1259,6 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
if (!strcmp(codec->name, dai_link->codec_name)) {
rtd->codec = codec;

if (!try_module_get(codec->dev->driver->owner))
return -ENODEV;

/* CODEC found, so find CODEC DAI from registered DAIs from this CODEC*/
list_for_each_entry(codec_dai, &dai_list, list) {
if (codec->dev == codec_dai->dev &&
Expand All @@ -1287,10 +1284,6 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
/* no, then find CPU DAI from registered DAIs*/
list_for_each_entry(platform, &platform_list, list) {
if (!strcmp(platform->name, dai_link->platform_name)) {

if (!try_module_get(platform->dev->driver->owner))
return -ENODEV;

rtd->platform = platform;
goto out;
}
Expand Down Expand Up @@ -1425,6 +1418,9 @@ static int soc_probe_codec(struct snd_soc_card *card,
soc_init_codec_debugfs(codec);

/* mark codec as probed and add to card codec list */
if (!try_module_get(codec->dev->driver->owner))
return -ENODEV;

codec->probed = 1;
list_add(&codec->card_list, &card->codec_dev_list);
list_add(&codec->dapm.list, &card->dapm_list);
Expand Down Expand Up @@ -1556,6 +1552,10 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num)
}
}
/* mark platform as probed and add to card platform list */

if (!try_module_get(platform->dev->driver->owner))
return -ENODEV;

platform->probed = 1;
list_add(&platform->card_list, &card->platform_dev_list);
}
Expand Down

0 comments on commit 215efc5

Please sign in to comment.