diff options
| author | Kuninori Morimoto <[email protected]> | 2011-08-23 10:12:03 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2011-08-23 16:47:40 +0000 |
| commit | 29cc88979a8818cd8c5019426e945aed118b400e (patch) | |
| tree | 849401ad869d09ce45dd7a3fadd7eb71b1e9fcbd /drivers/usb/class/cdc-acm.c | |
| parent | usb: include module.h in the DesignWare USB3 DRD driver (diff) | |
| download | kernel-29cc88979a8818cd8c5019426e945aed118b400e.tar.gz kernel-29cc88979a8818cd8c5019426e945aed118b400e.zip | |
USB: use usb_endpoint_maxp() instead of le16_to_cpu()
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 <[email protected]>
Cc: Pavel Machek <[email protected]>
Cc: Johannes Erdfelt <[email protected]>
Cc: Vojtech Pavlik <[email protected]>
Cc: Oliver Neukum <[email protected]>
Cc: David Kubicek <[email protected]>
Cc: Johan Hovold <[email protected]>
Cc: Brad Hards <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Cc: Sebastian Andrzej Siewior <[email protected]>
Cc: Thomas Dahlmann <[email protected]>
Cc: David Brownell <[email protected]>
Cc: David Lopo <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Michal Nazarewicz <[email protected]>
Cc: Xie Xiaobo <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Jiang Bo <[email protected]>
Cc: Yuan-hsin Chen <[email protected]>
Cc: Darius Augulis <[email protected]>
Cc: Xiaochen Shen <[email protected]>
Cc: Yoshihiro Shimoda <[email protected]>
Cc: OKI SEMICONDUCTOR, <[email protected]>
Cc: Robert Jarzmik <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Thomas Abraham <[email protected]>
Cc: Herbert Pƶtzl <[email protected]>
Cc: Arnaud Patard <[email protected]>
Cc: Roman Weissgaerber <[email protected]>
Acked-by: Sarah Sharp <[email protected]>
Cc: Tony Olech <[email protected]>
Cc: Florian Floe Echtler <[email protected]>
Cc: Christian Lucht <[email protected]>
Cc: Juergen Stuber <[email protected]>
Cc: Georges Toth <[email protected]>
Cc: Bill Ryder <[email protected]>
Cc: Kuba Ober <[email protected]>
Cc: Inaky Perez-Gonzalez <[email protected]>
Signed-off-by: Kuninori Morimoto <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/class/cdc-acm.c')
| -rw-r--r-- | drivers/usb/class/cdc-acm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index dac7676ce21b..f69a1854a59c 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -1058,11 +1058,11 @@ made_compressed_probe: goto alloc_fail; } - ctrlsize = le16_to_cpu(epctrl->wMaxPacketSize); - readsize = le16_to_cpu(epread->wMaxPacketSize) * + ctrlsize = usb_endpoint_maxp(epctrl); + readsize = usb_endpoint_maxp(epread) * (quirks == SINGLE_RX_URB ? 1 : 2); acm->combined_interfaces = combined_interfaces; - acm->writesize = le16_to_cpu(epwrite->wMaxPacketSize) * 20; + acm->writesize = usb_endpoint_maxp(epwrite) * 20; acm->control = control_interface; acm->data = data_interface; acm->minor = minor; |
