From 29cc88979a8818cd8c5019426e945aed118b400e Mon Sep 17 00:00:00 2001 From: Kuninori Morimoto Date: Tue, 23 Aug 2011 03:12:03 -0700 Subject: USB: use usb_endpoint_maxp() instead of le16_to_cpu() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now ${LINUX}/drivers/usb/* can use usb_endpoint_maxp(desc) to get maximum packet size instead of le16_to_cpu(desc->wMaxPacketSize). This patch fix it up Cc: Armin Fuerst Cc: Pavel Machek Cc: Johannes Erdfelt Cc: Vojtech Pavlik Cc: Oliver Neukum Cc: David Kubicek Cc: Johan Hovold Cc: Brad Hards Acked-by: Felipe Balbi Cc: Sebastian Andrzej Siewior Cc: Thomas Dahlmann Cc: David Brownell Cc: David Lopo Cc: Alan Stern Cc: Michal Nazarewicz Cc: Xie Xiaobo Cc: Li Yang Cc: Jiang Bo Cc: Yuan-hsin Chen Cc: Darius Augulis Cc: Xiaochen Shen Cc: Yoshihiro Shimoda Cc: OKI SEMICONDUCTOR, Cc: Robert Jarzmik Cc: Ben Dooks Cc: Thomas Abraham Cc: Herbert Pƶtzl Cc: Arnaud Patard Cc: Roman Weissgaerber Acked-by: Sarah Sharp Cc: Tony Olech Cc: Florian Floe Echtler Cc: Christian Lucht Cc: Juergen Stuber Cc: Georges Toth Cc: Bill Ryder Cc: Kuba Ober Cc: Inaky Perez-Gonzalez Signed-off-by: Kuninori Morimoto Signed-off-by: Greg Kroah-Hartman --- include/linux/usb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/usb.h') diff --git a/include/linux/usb.h b/include/linux/usb.h index 73c7df489607..c19f9100c307 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1574,7 +1574,7 @@ usb_maxpacket(struct usb_device *udev, int pipe, int is_out) return 0; /* NOTE: only 0x07ff bits are for packet size... */ - return le16_to_cpu(ep->desc.wMaxPacketSize); + return usb_endpoint_maxp(&ep->desc); } /* ----------------------------------------------------------------------- */ -- cgit v1.2.3-58-ga151