summaryrefslogtreecommitdiffstats
path: root/drivers/staging/octeon-usb
diff options
context:
space:
mode:
authorAaro Koskinen <aaro.koskinen@iki.fi>2013-10-06 22:22:34 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-06 22:02:21 -0700
commitbe44063df5b1eb1d10066c9d88c514d49411748b (patch)
tree50bf9c30232a258bb12e0306462bc5c315781d19 /drivers/staging/octeon-usb
parente16b5e3f14365c29f84e2fa5ab4780e58a6736f1 (diff)
downloadlinux-be44063df5b1eb1d10066c9d88c514d49411748b.tar.gz
linux-be44063df5b1eb1d10066c9d88c514d49411748b.tar.bz2
linux-be44063df5b1eb1d10066c9d88c514d49411748b.zip
staging: octeon-usb: clean up hcpriv usage
Use ep->hcpriv for pipe handle and urb->hcpriv for submit handle, instead of packing both into the same field. Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/octeon-usb')
-rw-r--r--drivers/staging/octeon-usb/octeon-hcd.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 0a448aead872..afaf991b22d7 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -3348,9 +3348,9 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
dev_dbg(dev, "Failed to create pipe\n");
return -ENOMEM;
}
- ep->hcpriv = (void *)(0x10000L + pipe_handle);
+ ep->hcpriv = (void *)(long)pipe_handle;
} else {
- pipe_handle = 0xffff & (long)ep->hcpriv;
+ pipe_handle = (long)ep->hcpriv;
}
switch (usb_pipetype(urb->pipe)) {
@@ -3415,7 +3415,7 @@ static int octeon_usb_urb_enqueue(struct usb_hcd *hcd,
dev_dbg(dev, "Failed to submit\n");
return -ENOMEM;
}
- urb->hcpriv = (void *)(long)(((submit_handle & 0xffff) << 16) | pipe_handle);
+ urb->hcpriv = (void *)(long)submit_handle;
spin_unlock_irqrestore(&priv->lock, flags);
return 0;
}
@@ -3434,8 +3434,8 @@ static void octeon_usb_urb_dequeue_work(unsigned long arg)
list_del(&urb->urb_list);
/* not enqueued on dequeue_list */
INIT_LIST_HEAD(&urb->urb_list);
- pipe_handle = 0xffff & (long)urb->hcpriv;
- submit_handle = ((long)urb->hcpriv) >> 16;
+ pipe_handle = (long)urb->ep->hcpriv;
+ submit_handle = (long)urb->hcpriv;
cvmx_usb_cancel(&priv->usb, pipe_handle, submit_handle);
}
@@ -3468,7 +3468,7 @@ static void octeon_usb_endpoint_disable(struct usb_hcd *hcd, struct usb_host_end
if (ep->hcpriv) {
struct octeon_hcd *priv = hcd_to_octeon(hcd);
- int pipe_handle = 0xffff & (long)ep->hcpriv;
+ int pipe_handle = (long)ep->hcpriv;
unsigned long flags;
spin_lock_irqsave(&priv->lock, flags);
cvmx_usb_cancel_all(&priv->usb, pipe_handle);