]> git.kernelconcepts.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:26:52 +0000 (09:26 -0700)
commit168421aba8d57a7798c9a6ec2493ff6fa4b3cbae
tree169d4262b1f03556a3879a7f0cd7e4578f5eab08
parent46070382f1745a7ada312fd0db4dff722eb4f52d
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