usb: gadget: dfu: correct size for USB_REQ_DFU_GETSTATE result
authorPatrick Delaunay <patrick.delaunay@st.com>
Fri, 16 Dec 2016 17:41:31 +0000 (18:41 +0100)
committerMarek Vasut <marex@denx.de>
Sun, 26 Feb 2017 12:24:30 +0000 (13:24 +0100)
commitf11bb2524541556682b83ee694829208b960b56c
tree3aaa70cd0d24bcc086fc08481aff0896c29545a9
parent8987012fe5a8bc226d1b3f5187c152b8d85a2dcd
usb: gadget: dfu: correct size for USB_REQ_DFU_GETSTATE result

return the correct size for DFU_GETSTATE result (1 byte in DFU 1.1 spec)
to avoid issue in USB protocol and the variable "value" is propagated
to req->lenght as all the in the other request with answer
- DFU_GETSTATUS
- DFU_DNLOAD
- DFU_UPLOAD
Then the buffer is correctly treated in USB driver

NB: it was the only request witch directly change "req->actual"

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
drivers/usb/gadget/f_dfu.c