ASoC: Intel: Skylake: Fix for unloading module only when it is loaded
authorJeeja KP <jeeja.kp@intel.com>
Mon, 28 Mar 2016 16:41:30 +0000 (22:11 +0530)
committerMark Brown <broonie@kernel.org>
Mon, 28 Mar 2016 09:38:00 +0000 (10:38 +0100)
commitd643678b9a4e432a574b2ec601216afd720c69b6
tree9a5d2d7ae2710da4c6c7656c6ead275fb73467b3
parentc3efb42b207e22991dee86ca15861ede11a419fc
ASoC: Intel: Skylake: Fix for unloading module only when it is loaded

Module needs to be unloaded only when it is loaded successfully.
To fix this, first correct the module state sequence and set module
state to LOADED if module is loaded successfully.
When unloading the module check if module state is not in UNINIT,
then unload it.

Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/intel/skylake/skl-topology.c
sound/soc/intel/skylake/skl-topology.h