erst.hcd is pointer point to a xhci_hcd structure. In other places of xHCI driver, *hcd always point to a usb_hcd structure. Rename the pointer to *xhci to avoid confusion. Signed-off-by: Andiry Xu <andiry.xu@xxxxxxx> --- drivers/usb/host/xhci-mem.c | 2 +- drivers/usb/host/xhci-ring.c | 24 ++++++++++++------------ drivers/usb/host/xhci.h | 2 +- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/drivers/usb/host/xhci-mem.c b/drivers/usb/host/xhci-mem.c index abac240..f8bedc3 100644 --- a/drivers/usb/host/xhci-mem.c +++ b/drivers/usb/host/xhci-mem.c @@ -2032,7 +2032,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) * the event ring segment table (ERST). Section 4.9.3. */ xhci_dbg(xhci, "// Allocating event ring\n"); - xhci->erst.hcd = xhci; + xhci->erst.xhci = xhci; xhci->erst.ir_set = &xhci->run_regs->ir_set[0]; xhci->erst.ring = xhci_ring_alloc(xhci, ERST_NUM_SEGS, false, flags); if (!xhci->erst.ring) diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c index 876e124..b85ae40 100644 --- a/drivers/usb/host/xhci-ring.c +++ b/drivers/usb/host/xhci-ring.c @@ -2186,7 +2186,7 @@ static int xhci_handle_event(struct xhci_erst *erst) int ret; if (!erst->ring || !erst->ring->dequeue) { - erst->hcd->error_bitmask |= 1 << 1; + erst->xhci->error_bitmask |= 1 << 1; return 0; } @@ -2194,7 +2194,7 @@ static int xhci_handle_event(struct xhci_erst *erst) /* Does the HC or OS own the TRB? */ if ((le32_to_cpu(event->event_cmd.flags) & TRB_CYCLE) != erst->ring->cycle_state) { - erst->hcd->error_bitmask |= 1 << 2; + erst->xhci->error_bitmask |= 1 << 2; return 0; } @@ -2206,38 +2206,38 @@ static int xhci_handle_event(struct xhci_erst *erst) /* FIXME: Handle more event types. */ switch ((le32_to_cpu(event->event_cmd.flags) & TRB_TYPE_BITMASK)) { case TRB_TYPE(TRB_COMPLETION): - handle_cmd_completion(erst->hcd, &event->event_cmd); + handle_cmd_completion(erst->xhci, &event->event_cmd); break; case TRB_TYPE(TRB_PORT_STATUS): - handle_port_status(erst->hcd, event); + handle_port_status(erst->xhci, event); update_ptrs = 0; break; case TRB_TYPE(TRB_TRANSFER): - ret = handle_tx_event(erst->hcd, &event->trans_event); + ret = handle_tx_event(erst->xhci, &event->trans_event); if (ret < 0) - erst->hcd->error_bitmask |= 1 << 9; + erst->xhci->error_bitmask |= 1 << 9; else update_ptrs = 0; break; default: if ((le32_to_cpu(event->event_cmd.flags) & TRB_TYPE_BITMASK) >= TRB_TYPE(48)) - handle_vendor_event(erst->hcd, event); + handle_vendor_event(erst->xhci, event); else - erst->hcd->error_bitmask |= 1 << 3; + erst->xhci->error_bitmask |= 1 << 3; } /* Any of the above functions may drop and re-acquire the lock, so check * to make sure a watchdog timer didn't mark the host as non-responsive. */ - if (erst->hcd->xhc_state & XHCI_STATE_DYING) { - xhci_dbg(erst->hcd, "xHCI host dying, returning from " + if (erst->xhci->xhc_state & XHCI_STATE_DYING) { + xhci_dbg(erst->xhci, "xHCI host dying, returning from " "event handler.\n"); return 0; } if (update_ptrs) /* Update SW event ring dequeue pointer */ - inc_deq(erst->hcd, erst->ring, true); + inc_deq(erst->xhci, erst->ring, true); /* Are there more items on the event ring? Caller will call us again to * check. @@ -2339,7 +2339,7 @@ hw_died: irqreturn_t xhci_msi_irq(int irq, void *dev_id) { struct xhci_erst *erst = dev_id; - struct xhci_hcd *xhci = erst->hcd; + struct xhci_hcd *xhci = erst->xhci; irqreturn_t ret = IRQ_NONE; u64 erdp; diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h index 77daf2f..a1fd814 100644 --- a/drivers/usb/host/xhci.h +++ b/drivers/usb/host/xhci.h @@ -1140,7 +1140,7 @@ struct xhci_erst_entry { }; struct xhci_erst { - struct xhci_hcd *hcd; + struct xhci_hcd *xhci; struct xhci_ring *ring; struct xhci_intr_reg __iomem *ir_set; struct xhci_erst_entry *entries; -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html