Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 65171e6e authored by Jack Pham's avatar Jack Pham Committed by Gerrit - the friendly Code Review server
Browse files

usb: dwc3-msm: Fix driver removal



When performing driver unbind, several crashes are occuring in
the dwc3_msm_remove() function. This patch fixes the following:

- Disable runtime PM first to prevent any races with any suspend/
  resume happening during removal. It also places the device in
  active state so as to avoid clk_disable() multiple times.
- Replace device_init_wakeup(dev, 0) call with device_wakeup_disable()
  which properly removes the device's wakeup source. Otherwise
  it can remain active and prevent system suspend.
- Since of_platform_populate() is called in probe to add children
  in the device tree, we must unregister them using
  device_for_each_child().
- Fix the NULL check for mdwc->ext_chg_device when calling its
  removal routines.

Change-Id: I03b6db022e5f2a6ca4b63d0eddcad532d6f1f5e7
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent d61f39e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment