cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied
authorBen Hutchings <ben@decadent.org.uk>
Sun, 12 Feb 2012 06:02:43 +0000 (06:02 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Apr 2012 16:52:31 +0000 (09:52 -0700)
commit3d8e1c65555c758475a005c287f1c4b69296b226
treeb947584c75ff658d84935399018d93fcc10f79b0
parent8d272f9af55e8900fc96886bd72b158482ed55d0
cdc-wdm: Don't clear WDM_READ unless entire read buffer is emptied

commit b7a205545345578712611106b371538992e142ff upstream.

The WDM_READ flag is cleared later iff desc->length is reduced to 0.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Tested-by: Bjørn Mork <bjorn@mork.no>
Cc: Oliver Neukum <oliver@neukum.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/class/cdc-wdm.c