usb: host: xhci-tegra: Enable runtime PM as late as possible
authorThierry Reding <treding@nvidia.com>
Fri, 6 Dec 2019 14:06:50 +0000 (15:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2019 10:36:28 +0000 (11:36 +0100)
commit17926924be44b21556043a2faccc3b449110bd00
tree0deb33f0a93f1c2ad84cef7206740e458d841b60
parentecd0fbd12d0fb5ee030d97d5be44766552aba07c
usb: host: xhci-tegra: Enable runtime PM as late as possible

A number of things can currently go wrong after the XUSB controller has
been enabled, which means that it might need to be disabled again before
it has ever been used.

Avoid this by delaying runtime PM enablement until it's really required
right before registers are accessed for the first time.

Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/r/20191206140653.2085561-8-thierry.reding@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-tegra.c