summaryrefslogtreecommitdiffstats
path: root/include/trace/events
diff options
context:
space:
mode:
authorJarkko Nikula <jarkko.nikula@linux.intel.com>2014-04-28 15:30:51 +0300
committerMark Brown <broonie@linaro.org>2014-04-29 10:09:11 -0700
commit4da533932dedff930596bc536adaba1e508f9ffa (patch)
treeb3e54c8d576cf3c0a05652a0d184c286908389de /include/trace/events
parent907fe36a2cd572fe58d98be01457b945c47b996e (diff)
downloadop-kernel-dev-4da533932dedff930596bc536adaba1e508f9ffa.zip
op-kernel-dev-4da533932dedff930596bc536adaba1e508f9ffa.tar.gz
ASoC: core: Fix component_list corruption when unloading modules
This fixes module unload regressions introduced by commits 98e639fb8a3e ("ASoC: Track which components have been registered with snd_soc_register_component()") and b37f1d123c69 ("ASoC: Let snd_soc_platform subclass snd_soc_component"). First commit causes component_list to be corrupted when removing codec and second when removing platform. Reason for both is that components associated with platform or codec are never removed from the list because for them registered_as_component field in struct snd_soc_component is always false. Now list becomes corrupted when snd_soc_unregister_platform() or snd_soc_unregister_codec() frees the platform or codec structure and where the associated struct snd_soc_component is embedded. Fix these by moving component unregistration and cleanup to a new local function __snd_soc_unregister_component() that takes component as its argument. Since component is known for platforms and codecs the __snd_soc_unregister_component() can be called directly and snd_soc_unregister_component() takes care to find and unregister only components that were registered using snd_soc_register_component(). Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'include/trace/events')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud