]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align
authorFelipe F. Tonello <eu@felipetonello.com>
Mon, 8 Aug 2016 20:30:04 +0000 (21:30 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 25 Aug 2016 09:13:13 +0000 (12:13 +0300)
commit16b114a6d7973cf027e4c2b23eae1076eaf98c25
tree6790fe0f2c0a2a5ef926819fa27b43f73059e0af
parent6ac47090eef0c4358b04a974c4a5ac3d9bf44f79
usb: gadget: fix usb_ep_align_maybe endianness and new usb_ep_align

USB spec specifies wMaxPacketSize to be little endian (as other properties),
so when using this variable in the driver we should convert to the current
CPU endianness if necessary.

This patch also introduces usb_ep_align() which does always returns the
aligned buffer size for an endpoint. This is useful to be used by USB requests
allocator functions.

Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
include/linux/usb/gadget.h