mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 05:09:17 -04:00
usb: xhci: make 'sbrn' a local variable
Variable 'sbrn' is used to store the Serial Bus Release Number, which is then only used for a debug message. Thus, 'sbrn' can be a local variable and assigned after the primary HCD check. The SBRN debug message is only printed when a primary HCD is setup. Signed-off-by: Niklas Neronin <niklas.neronin@linux.intel.com> Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Link: https://lore.kernel.org/r/20240905143300.1959279-8-mathias.nyman@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b14485d461
commit
811cd6ed04
@@ -525,10 +525,9 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
|
||||
struct xhci_hcd *xhci;
|
||||
struct pci_dev *pdev = to_pci_dev(hcd->self.controller);
|
||||
int retval;
|
||||
u8 sbrn;
|
||||
|
||||
xhci = hcd_to_xhci(hcd);
|
||||
if (!xhci->sbrn)
|
||||
pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &xhci->sbrn);
|
||||
|
||||
/* imod_interval is the interrupt moderation value in nanoseconds. */
|
||||
xhci->imod_interval = 40000;
|
||||
@@ -543,7 +542,8 @@ static int xhci_pci_setup(struct usb_hcd *hcd)
|
||||
if (xhci->quirks & XHCI_PME_STUCK_QUIRK)
|
||||
xhci_pme_acpi_rtd3_enable(pdev);
|
||||
|
||||
xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int) xhci->sbrn);
|
||||
pci_read_config_byte(pdev, XHCI_SBRN_OFFSET, &sbrn);
|
||||
xhci_dbg(xhci, "Got SBRN %u\n", (unsigned int)sbrn);
|
||||
|
||||
/* Find any debug ports */
|
||||
return xhci_pci_reinit(xhci, pdev);
|
||||
|
||||
@@ -1498,7 +1498,6 @@ struct xhci_hcd {
|
||||
spinlock_t lock;
|
||||
|
||||
/* packed release number */
|
||||
u8 sbrn;
|
||||
u16 hci_version;
|
||||
u16 max_interrupters;
|
||||
/* imod_interval in ns (I * 250ns) */
|
||||
|
||||
Reference in New Issue
Block a user