Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

usb: dwc3: shutdown usb_phy when removing the device

We call usb_phy_init() from dwc3_core_init() during
probe, so adding usb_phy_shutdown() to dwc3_core_exit()
while removing the device so we don't keep PHYs
turned on, consuming power, unnecessarily.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>

authored by

Vivek Gautam and committed by
Felipe Balbi
01b8daf7 6ff1f3d3

+4
+4
drivers/usb/dwc3/core.c
··· 409 409 { 410 410 dwc3_event_buffers_cleanup(dwc); 411 411 dwc3_free_event_buffers(dwc); 412 + 413 + usb_phy_shutdown(dwc->usb2_phy); 414 + usb_phy_shutdown(dwc->usb3_phy); 415 + 412 416 } 413 417 414 418 #define DWC3_ALIGN_MASK (16 - 1)