mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 08:07:32 -04:00
Merge "cnss2: Move power on and bus init to the end of platform probe call"
This commit is contained in:
commit
9e25df37c6
1 changed files with 21 additions and 19 deletions
|
|
@ -3162,19 +3162,9 @@ static int cnss_probe(struct platform_device *plat_dev)
|
|||
if (ret)
|
||||
goto reset_ctx;
|
||||
|
||||
if (!test_bit(SKIP_DEVICE_BOOT, &plat_priv->ctrl_params.quirks)) {
|
||||
ret = cnss_power_on_device(plat_priv);
|
||||
if (ret)
|
||||
goto free_res;
|
||||
|
||||
ret = cnss_bus_init(plat_priv);
|
||||
if (ret)
|
||||
goto power_off;
|
||||
}
|
||||
|
||||
ret = cnss_register_esoc(plat_priv);
|
||||
if (ret)
|
||||
goto deinit_bus;
|
||||
goto free_res;
|
||||
|
||||
ret = cnss_register_bus_scale(plat_priv);
|
||||
if (ret)
|
||||
|
|
@ -3204,6 +3194,19 @@ static int cnss_probe(struct platform_device *plat_dev)
|
|||
if (ret)
|
||||
goto destroy_debugfs;
|
||||
|
||||
/* Make sure all platform related init are done before
|
||||
* device power on and bus init.
|
||||
*/
|
||||
if (!test_bit(SKIP_DEVICE_BOOT, &plat_priv->ctrl_params.quirks)) {
|
||||
ret = cnss_power_on_device(plat_priv);
|
||||
if (ret)
|
||||
goto deinit_misc;
|
||||
|
||||
ret = cnss_bus_init(plat_priv);
|
||||
if (ret)
|
||||
goto power_off;
|
||||
}
|
||||
|
||||
cnss_register_coex_service(plat_priv);
|
||||
cnss_register_ims_service(plat_priv);
|
||||
|
||||
|
|
@ -3215,6 +3218,11 @@ static int cnss_probe(struct platform_device *plat_dev)
|
|||
|
||||
return 0;
|
||||
|
||||
power_off:
|
||||
if (!test_bit(SKIP_DEVICE_BOOT, &plat_priv->ctrl_params.quirks))
|
||||
cnss_power_off_device(plat_priv);
|
||||
deinit_misc:
|
||||
cnss_misc_deinit(plat_priv);
|
||||
destroy_debugfs:
|
||||
cnss_debugfs_destroy(plat_priv);
|
||||
deinit_dms:
|
||||
|
|
@ -3229,12 +3237,6 @@ unreg_bus_scale:
|
|||
cnss_unregister_bus_scale(plat_priv);
|
||||
unreg_esoc:
|
||||
cnss_unregister_esoc(plat_priv);
|
||||
deinit_bus:
|
||||
if (!test_bit(SKIP_DEVICE_BOOT, &plat_priv->ctrl_params.quirks))
|
||||
cnss_bus_deinit(plat_priv);
|
||||
power_off:
|
||||
if (!test_bit(SKIP_DEVICE_BOOT, &plat_priv->ctrl_params.quirks))
|
||||
cnss_power_off_device(plat_priv);
|
||||
free_res:
|
||||
cnss_put_resources(plat_priv);
|
||||
reset_ctx:
|
||||
|
|
@ -3251,15 +3253,15 @@ static int cnss_remove(struct platform_device *plat_dev)
|
|||
cnss_genl_exit();
|
||||
cnss_unregister_ims_service(plat_priv);
|
||||
cnss_unregister_coex_service(plat_priv);
|
||||
cnss_bus_deinit(plat_priv);
|
||||
cnss_misc_deinit(plat_priv);
|
||||
cnss_debugfs_destroy(plat_priv);
|
||||
cnss_qmi_deinit(plat_priv);
|
||||
cnss_dms_deinit(plat_priv);
|
||||
cnss_qmi_deinit(plat_priv);
|
||||
cnss_event_work_deinit(plat_priv);
|
||||
cnss_remove_sysfs(plat_priv);
|
||||
cnss_unregister_bus_scale(plat_priv);
|
||||
cnss_unregister_esoc(plat_priv);
|
||||
cnss_bus_deinit(plat_priv);
|
||||
cnss_put_resources(plat_priv);
|
||||
platform_set_drvdata(plat_dev, NULL);
|
||||
plat_env = NULL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue