aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core/urb.c
diff options
context:
space:
mode:
authorMatthew Wilcox <willy@linux.intel.com>2010-04-30 15:11:29 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 16:21:41 -0400
commitfe54b058de9d1df5fef9e2a559651f4b7c9f04b1 (patch)
tree9ed1f427416478e8832f5ca67c17bd8433a87630 /drivers/usb/core/urb.c
parentb18a23495fd4492081a61373fc3ef9f5c59e094a (diff)
USB: Add a usb_pipe_endpoint() convenience function
Converting a pipe number to a struct usb_host_endpoint pointer is a little messy. Introduce a new convenience function to hide the mess. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/urb.c')
-rw-r--r--drivers/usb/core/urb.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/core/urb.c b/drivers/usb/core/urb.c
index a760e46871c5..7c0555548ac8 100644
--- a/drivers/usb/core/urb.c
+++ b/drivers/usb/core/urb.c
@@ -308,8 +308,7 @@ int usb_submit_urb(struct urb *urb, gfp_t mem_flags)
308 * will be required to set urb->ep directly and we will eliminate 308 * will be required to set urb->ep directly and we will eliminate
309 * urb->pipe. 309 * urb->pipe.
310 */ 310 */
311 ep = (usb_pipein(urb->pipe) ? dev->ep_in : dev->ep_out) 311 ep = usb_pipe_endpoint(dev, urb->pipe);
312 [usb_pipeendpoint(urb->pipe)];
313 if (!ep) 312 if (!ep)
314 return -ENOENT; 313 return -ENOENT;
315 314