Skip to content

Commit

Permalink
usb: ch9.h: usb_endpoint_maxp() uses __le16_to_cpu()
Browse files Browse the repository at this point in the history
The usb/ch9.h will be installed to /usr/include/linux,
and be used from user space.
But le16_to_cpu() is only defined for kernel code.
Without this patch, user space compile will be broken.
Special thanks to Stefan Becker

Reported-by: Stefan Becker <chemobejk@gmail.com>
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Kuninori Morimoto authored and Greg Kroah-Hartman committed Feb 1, 2012
1 parent 0a36570 commit 504b616
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/usb/ch9.h
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ static inline int usb_endpoint_is_isoc_out(
*/
static inline int usb_endpoint_maxp(const struct usb_endpoint_descriptor *epd)
{
return le16_to_cpu(epd->wMaxPacketSize);
return __le16_to_cpu(epd->wMaxPacketSize);
}

/*-------------------------------------------------------------------------*/
Expand Down

0 comments on commit 504b616

Please sign in to comment.