Function xhci_writel() is used to write a 32bit value in xHC registers residing
in MMIO address space. It takes as first argument a pointer to the xhci_hcd
although it does not use it because internally it simply calls writel().
This creates an illusion that xhci_writel() is an xhci specific function that
has to be called in a context where a pointer to xhci_hcd is available.
This patch replaces calls to xhci_writel() with calls to writel() in
xhci-ring.c.
This is done so that xhci_writel() can be removed completely and code can
become more straight-forward.

Signed-off-by: Xenia Ragiadakou <burzalod...@gmail.com>
---
 drivers/usb/host/xhci-ring.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/usb/host/xhci-ring.c b/drivers/usb/host/xhci-ring.c
index 5c36c5b..9b50a54 100644
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -285,7 +285,7 @@ void xhci_ring_cmd_db(struct xhci_hcd *xhci)
                return;
 
        xhci_dbg(xhci, "// Ding dong!\n");
-       xhci_writel(xhci, DB_VALUE_HOST, &xhci->dba->doorbell[0]);
+       writel(DB_VALUE_HOST, &xhci->dba->doorbell[0]);
        /* Flush PCI posted writes */
        readl(&xhci->dba->doorbell[0]);
 }
@@ -417,7 +417,7 @@ void xhci_ring_ep_doorbell(struct xhci_hcd *xhci,
        if ((ep_state & EP_HALT_PENDING) || (ep_state & SET_DEQ_PENDING) ||
            (ep_state & EP_HALTED))
                return;
-       xhci_writel(xhci, DB_VALUE(ep_index, stream_id), db_addr);
+       writel(DB_VALUE(ep_index, stream_id), db_addr);
        /* The CPU has better things to do at this point than wait for a
         * write-posting flush.  It'll get there soon enough.
         */
@@ -2825,7 +2825,7 @@ hw_died:
         * Write 1 to clear the interrupt status.
         */
        status |= STS_EINT;
-       xhci_writel(xhci, status, &xhci->op_regs->status);
+       writel(status, &xhci->op_regs->status);
        /* FIXME when MSI-X is supported and there are multiple vectors */
        /* Clear the MSI-X event interrupt status */
 
@@ -2834,7 +2834,7 @@ hw_died:
                /* Acknowledge the PCI interrupt */
                irq_pending = readl(&xhci->ir_set->irq_pending);
                irq_pending |= IMAN_IP;
-               xhci_writel(xhci, irq_pending, &xhci->ir_set->irq_pending);
+               writel(irq_pending, &xhci->ir_set->irq_pending);
        }
 
        if (xhci->xhc_state & XHCI_STATE_DYING) {
-- 
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to