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>
This commit is contained in:
@@ -274,10 +274,10 @@ struct skl_pipe {
|
||||
|
||||
enum skl_module_state {
|
||||
SKL_MODULE_UNINIT = 0,
|
||||
SKL_MODULE_INIT_DONE = 1,
|
||||
SKL_MODULE_LOADED = 2,
|
||||
SKL_MODULE_UNLOADED = 3,
|
||||
SKL_MODULE_BIND_DONE = 4
|
||||
SKL_MODULE_LOADED = 1,
|
||||
SKL_MODULE_INIT_DONE = 2,
|
||||
SKL_MODULE_BIND_DONE = 3,
|
||||
SKL_MODULE_UNLOADED = 4,
|
||||
};
|
||||
|
||||
struct skl_module_cfg {
|
||||
|
Reference in New Issue
Block a user