usb: host: xhci-tegra: Reuse stored register base address
authorThierry Reding <treding@nvidia.com>
Fri, 6 Dec 2019 14:06:49 +0000 (15:06 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Dec 2019 10:36:28 +0000 (11:36 +0100)
commitecd0fbd12d0fb5ee030d97d5be44766552aba07c
treee9392af94e3972f6282a77ff7ee260d934547b10
parent96d8f628f0b35e1c1d93340cd4d2cde1ed3b8d9f
usb: host: xhci-tegra: Reuse stored register base address

The base address of the XUSB controller's registers is already stored in
the HCD. Move assignment to the HCD fields to an earlier point so that
they can be reused in the tegra_xusb_config() function. This avoids the
need to pass the base address as an extra parameter, which in turn comes
in handy in subsequent patches that need to call this function from the
suspend/resume paths where these values are no longer readily available.

Based on work by JC Kuo <jckuo@nvidia.com>.

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