mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
pci: msm: Flush workqueue and destroy it in mhi controller unregister
In mhi_unregister_mhi_controller function, flush the work queue and then destroy it for releasing the memory of unused workqueues. When multiple mhi-based WLAN endpoints are attached directly or over switch, then there can be multiple mhi controllers and so CNSS driver calls for mhi controller registration multiple times. Each time invoking mhi controller register creates another set of workqueues and previous workqueues become stale. By doing so, it will consume the system memory. So, better to release the memory assigned to workqueue by destroying the work queue in mhi_unregister_mhi_controller function. Change-Id: I838371e9c00969a64e658e6175115363ccb916bf Signed-off-by: Jyothi Kumar Seerapu <quic_jseerapu@quicinc.com>
This commit is contained in:
parent
9ef9b9d575
commit
d37fe0868c
1 changed files with 2 additions and 0 deletions
|
|
@ -1743,6 +1743,8 @@ void mhi_unregister_mhi_controller(struct mhi_controller *mhi_cntrl)
|
|||
struct mhi_device *mhi_dev = mhi_cntrl->mhi_dev;
|
||||
struct mhi_sfr_info *sfr_info = mhi_cntrl->mhi_sfr;
|
||||
|
||||
destroy_workqueue(mhi_cntrl->wq);
|
||||
|
||||
kfree(mhi_cntrl->mhi_cmd);
|
||||
kfree(mhi_cntrl->mhi_event);
|
||||
vfree(mhi_cntrl->mhi_chan);
|
||||
|
|
|
|||
Loading…
Reference in a new issue