summaryrefslogtreecommitdiff
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorLinyu Yuan <quic_linyyuan@quicinc.com>2022-03-03 14:09:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-03-03 17:46:08 +0300
commitc63d5757d0fcbcb6cb4ceb038ef1c477a51c0930 (patch)
tree8a54010916bc501d65283c659a6eb303c8c3bf69 /drivers/usb/host
parentddfaee6255945a59f897033ffb55cfcdc5bcf946 (diff)
downloadlinux-c63d5757d0fcbcb6cb4ceb038ef1c477a51c0930.tar.xz
usb: host: xhci: update hci_version operation in xhci_gen_setup()
There is no need to store temperary value in hcc_params. Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20220303110903.1662404-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 6b32f7e65d4c..e17eef88e5d7 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -5279,8 +5279,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
xhci->hcs_params1 = readl(&xhci->cap_regs->hcs_params1);
xhci->hcs_params2 = readl(&xhci->cap_regs->hcs_params2);
xhci->hcs_params3 = readl(&xhci->cap_regs->hcs_params3);
- xhci->hcc_params = readl(&xhci->cap_regs->hc_capbase);
- xhci->hci_version = HC_VERSION(xhci->hcc_params);
+ xhci->hci_version = HC_VERSION(readl(&xhci->cap_regs->hc_capbase));
xhci->hcc_params = readl(&xhci->cap_regs->hcc_params);
if (xhci->hci_version > 0x100)
xhci->hcc_params2 = readl(&xhci->cap_regs->hcc_params2);