diff options
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r-- | include/linux/usb.h | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index 200b7b79acb5..60bee864d897 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1969,21 +1969,10 @@ usb_pipe_endpoint(struct usb_device *dev, unsigned int pipe) return eps[usb_pipeendpoint(pipe)]; } -/*-------------------------------------------------------------------------*/ - -static inline __u16 -usb_maxpacket(struct usb_device *udev, int pipe, int is_out) +static inline u16 usb_maxpacket(struct usb_device *udev, int pipe) { - struct usb_host_endpoint *ep; - unsigned epnum = usb_pipeendpoint(pipe); + struct usb_host_endpoint *ep = usb_pipe_endpoint(udev, pipe); - if (is_out) { - WARN_ON(usb_pipein(pipe)); - ep = udev->ep_out[epnum]; - } else { - WARN_ON(usb_pipeout(pipe)); - ep = udev->ep_in[epnum]; - } if (!ep) return 0; @@ -1991,8 +1980,6 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) return usb_endpoint_maxp(&ep->desc); } -/* ----------------------------------------------------------------------- */ - /* translate USB error codes to codes user space understands */ static inline int usb_translate_errors(int error_code) { |