Commit 939f325f authored by kuninori.morimoto.gx@renesas.com's avatar kuninori.morimoto.gx@renesas.com Committed by Greg Kroah-Hartman

usb: add usb_endpoint_maxp() macro

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 23106343
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#define __LINUX_USB_CH9_H #define __LINUX_USB_CH9_H
#include <linux/types.h> /* __u8 etc */ #include <linux/types.h> /* __u8 etc */
#include <asm/byteorder.h> /* le16_to_cpu */
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
...@@ -570,6 +571,17 @@ static inline int usb_endpoint_is_isoc_out( ...@@ -570,6 +571,17 @@ static inline int usb_endpoint_is_isoc_out(
return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd); return usb_endpoint_xfer_isoc(epd) && usb_endpoint_dir_out(epd);
} }
/**
* usb_endpoint_maxp - get endpoint's max packet size
* @epd: endpoint to be checked
*
* Returns @epd's max packet
*/
static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
{
return le16_to_cpu(epd->wMaxPacketSize);
}
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
/* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */ /* USB_DT_SS_ENDPOINT_COMP: SuperSpeed Endpoint Companion descriptor */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment