diff options
author | SangSu Park <sangsu@gmail.com> | 2008-09-22 18:41:15 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-17 17:40:56 -0400 |
commit | 8296345a35551414b07419f4c9223734c1fc5437 (patch) | |
tree | ca1607143d3ef663f77b9520de9d992df6f0f58e /drivers/usb/gadget | |
parent | 0b14c3881d4b91272b779f4037e263d392de058f (diff) |
USB: g_printer: fix handling zero-length packet
g_printer doesn't have to check whether the data size is a multiple of
MaxPacketSize, because device controller driver already make that check.
Signed-off-by: SangSu Park<sangsu@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: David Brownell <david-b@pacbell.net>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget')
-rw-r--r-- | drivers/usb/gadget/printer.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 2b3b9e1dd2ee..00b7ed5013a6 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c | |||
@@ -1278,8 +1278,7 @@ unknown: | |||
1278 | /* respond with data transfer before status phase? */ | 1278 | /* respond with data transfer before status phase? */ |
1279 | if (value >= 0) { | 1279 | if (value >= 0) { |
1280 | req->length = value; | 1280 | req->length = value; |
1281 | req->zero = value < wLength | 1281 | req->zero = value < wLength; |
1282 | && (value % gadget->ep0->maxpacket) == 0; | ||
1283 | value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); | 1282 | value = usb_ep_queue(gadget->ep0, req, GFP_ATOMIC); |
1284 | if (value < 0) { | 1283 | if (value < 0) { |
1285 | DBG(dev, "ep_queue --> %d\n", value); | 1284 | DBG(dev, "ep_queue --> %d\n", value); |