]> git.karo-electronics.de Git - karo-tx-linux.git/commit
usb: gadgetfs: return number of bytes on ep0 read request
authorThomas Faber <thfabba@gmx.de>
Fri, 2 Mar 2012 08:41:50 +0000 (09:41 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:52:30 +0000 (09:52 -0700)
commitd8808b35aaac220884881a5b11a57ef65d2eb45d
tree929b34840af192f9acf4d1b056b6aa7ed6b238f7
parentb94e22b626e2ba1e73bea71998c769624279b958
usb: gadgetfs: return number of bytes on ep0 read request

commit 85b4b3c8c189e0159101f7628a71411af072ff69 upstream.

A read from GadgetFS endpoint 0 during the data stage of a control
request would always return 0 on success (as returned by
wait_event_interruptible) despite having written data into the user
buffer.
This patch makes it correctly set the return value to the number of
bytes read.

Signed-off-by: Thomas Faber <thfabba@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/inode.c