mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
qcacld-3.0: move registration to end of driver load
An upcoming change will add synchronization to the driver load operation. Effectively, driver load and psoc probe will need to be exclusive operations. Because driver registration can synchronously invoke psoc probe, move this registration to the end of the driver load function. This prepares the way for adding synchronization around the bulk of the load logic, and releasing it just before registration. This avoids issues where driver load and psoc probe would otherwise execute at the same time. Change-Id: I3a617673ea0d4a56e2c08b2ef2f98f8cbdf42205 CRs-Fixed: 2315976
This commit is contained in:
parent
bbc70fa636
commit
4b9dbe62c7
1 changed files with 8 additions and 8 deletions
|
|
@ -12731,24 +12731,24 @@ static int hdd_driver_load(void)
|
|||
|
||||
hdd_set_conparam(con_mode);
|
||||
|
||||
errno = wlan_hdd_register_driver();
|
||||
if (errno) {
|
||||
hdd_fln("Failed to register driver; errno:%d", errno);
|
||||
goto wakelock_destroy;
|
||||
}
|
||||
|
||||
errno = wlan_hdd_state_ctrl_param_create();
|
||||
if (errno) {
|
||||
hdd_fln("Failed to create ctrl param; errno:%d", errno);
|
||||
goto unregister_driver;
|
||||
goto wakelock_destroy;
|
||||
}
|
||||
|
||||
errno = wlan_hdd_register_driver();
|
||||
if (errno) {
|
||||
hdd_fln("Failed to register driver; errno:%d", errno);
|
||||
goto param_destroy;
|
||||
}
|
||||
|
||||
pr_info("%s: driver loaded\n", WLAN_MODULE_NAME);
|
||||
|
||||
return 0;
|
||||
|
||||
unregister_driver:
|
||||
wlan_hdd_unregister_driver();
|
||||
param_destroy:
|
||||
wlan_hdd_state_ctrl_param_destroy();
|
||||
wakelock_destroy:
|
||||
qdf_wake_lock_destroy(&wlan_wake_lock);
|
||||
comp_deinit:
|
||||
|
|
@ -12788,8 +12788,8 @@ static void hdd_driver_unload(void)
|
|||
if (hdd_ctx)
|
||||
qdf_cancel_delayed_work(&hdd_ctx->iface_idle_work);
|
||||
|
||||
wlan_hdd_state_ctrl_param_destroy();
|
||||
wlan_hdd_unregister_driver();
|
||||
wlan_hdd_state_ctrl_param_destroy();
|
||||
hdd_set_conparam(0);
|
||||
qdf_wake_lock_destroy(&wlan_wake_lock);
|
||||
hdd_component_deinit();
|
||||
|
|
|
|||
Loading…
Reference in a new issue