diff mbox

[18/20] usb: host: xhci: make ep_state a value, not a reference

Message ID 20180416122930.15697-18-felipe.balbi@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Felipe Balbi April 16, 2018, 12:29 p.m. UTC
This is now the single use of ep_state inside urb_enqueue(). We don't
need it to be a pointer anymore.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
---
 drivers/usb/host/xhci.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index cd5b6bf4c867..bff4f506035d 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1303,7 +1303,7 @@  static int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
 	struct xhci_hcd *xhci = hcd_to_xhci(hcd);
 	struct urb_priv	*urb_priv;
 	unsigned long flags;
-	unsigned int *ep_state;
+	unsigned int ep_state;
 	unsigned int ep_index;
 	unsigned int slot_id;
 	int num_tds;
@@ -1327,7 +1327,7 @@  static int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
 
 	slot_id = urb->dev->slot_id;
 	ep_index = xhci_get_endpoint_index(&urb->ep->desc);
-	ep_state = &xhci->devs[slot_id]->eps[ep_index].ep_state;
+	ep_state = xhci->devs[slot_id]->eps[ep_index].ep_state;
 
 	if (usb_endpoint_xfer_control(&urb->ep->desc)) {
 		/* Check to see if the max packet size for the default control
@@ -1355,7 +1355,7 @@  static int xhci_urb_enqueue(struct usb_hcd *hcd, struct urb *urb, gfp_t mem_flag
 
 	spin_lock_irqsave(&xhci->lock, flags);
 
-	if (*ep_state & EP_SOFT_CLEAR_TOGGLE) {
+	if (ep_state & EP_SOFT_CLEAR_TOGGLE) {
 		xhci_warn(xhci, "Can't enqueue URB while manually clearing toggle\n");
 		ret = -EINVAL;
 		goto free_priv;