usb: ch9.h: usb_endpoint_maxp() uses __le16_to_cpu()
authorKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Wed, 1 Feb 2012 00:43:50 +0000 (16:43 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 1 Feb 2012 23:56:19 +0000 (15:56 -0800)
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>
include/linux/usb/ch9.h

index 61b29057b0547cbe42e050d1debab583d8fd38e1..3b6f628880f83b0f05b3c3363a7202665a5ce9ca 100644 (file)
@@ -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);
 }
 
 /*-------------------------------------------------------------------------*/