Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316245
b: refs/heads/master
c: d12cd19
h: refs/heads/master
i:
  316243: 770d849
v: v3
  • Loading branch information
Stephen Warren authored and Mark Brown committed Jun 13, 2012
1 parent 98e39e5 commit a0d97dc
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 17 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: 18d756440e8ed292b772682c4440a9d33643225b
refs/heads/master: d12cd198cba7949c70f596296297b772063175c0
40 changes: 24 additions & 16 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,28 @@ static int soc_bind_dai_link(struct snd_soc_card *card, int num)
return 0;
}

static int soc_remove_platform(struct snd_soc_platform *platform)
{
int ret;

if (platform->driver->remove) {
ret = platform->driver->remove(platform);
if (ret < 0)
pr_err("asoc: failed to remove %s: %d\n",
platform->name, ret);
}

/* Make sure all DAPM widgets are freed */
snd_soc_dapm_free(&platform->dapm);

soc_cleanup_platform_debugfs(platform);
platform->probed = 0;
list_del(&platform->card_list);
module_put(platform->dev->driver->owner);

return 0;
}

static void soc_remove_codec(struct snd_soc_codec *codec)
{
int err;
Expand Down Expand Up @@ -950,22 +972,8 @@ static void soc_remove_dai_link(struct snd_soc_card *card, int num, int order)

/* remove the platform */
if (platform && platform->probed &&
platform->driver->remove_order == order) {
if (platform->driver->remove) {
err = platform->driver->remove(platform);
if (err < 0)
pr_err("asoc: failed to remove %s: %d\n",
platform->name, err);
}

/* Make sure all DAPM widgets are freed */
snd_soc_dapm_free(&platform->dapm);

soc_cleanup_platform_debugfs(platform);
platform->probed = 0;
list_del(&platform->card_list);
module_put(platform->dev->driver->owner);
}
platform->driver->remove_order == order)
soc_remove_platform(platform);

/* remove the CODEC */
if (codec && codec->probed &&
Expand Down

0 comments on commit a0d97dc

Please sign in to comment.