]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: when removing a CPU DAI, clean up its DAPM context
authorStephen Warren <swarren@nvidia.com>
Fri, 8 Jun 2012 18:34:21 +0000 (12:34 -0600)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 13 Jun 2012 12:18:04 +0000 (13:18 +0100)
commiteb700c562d9865d5ea33353386e7d65e8773791f
treeacf3fc935339dfdd105ff3376be0e690121c9f15
parent75e368f353deeb279f7374b55f5f49d19511aa57
ASoC: when removing a CPU DAI, clean up its DAPM context

When a standalone CPU DAI (one not part of a CODEC) is probed, widgets
are created for it. Add a call to snd_soc_dapm_free() in order to clean
these up when the CPU DAI is removed.

In order for snd_soc_dapm_free() to work, the CPU DAI's DAPM context's
list member must be initialized, since snd_soc_dapm_free() removes that
from the list it's part of. Add it to the card's list of DAPM contexts.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-core.c