aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/usb.h8
1 files changed, 1 insertions, 7 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 8127782aa7a1..60bee864d897 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1971,13 +1971,7 @@ usb_pipe_endpoint(struct usb_device *dev, unsigned int pipe)
static inline u16 usb_maxpacket(struct usb_device *udev, int pipe)
{
- struct usb_host_endpoint *ep;
- unsigned epnum = usb_pipeendpoint(pipe);
-
- if (usb_pipeout(pipe))
- ep = udev->ep_out[epnum];
- else
- ep = udev->ep_in[epnum];
+ struct usb_host_endpoint *ep = usb_pipe_endpoint(udev, pipe);
if (!ep)
return 0;