usb: gadget: printer: add req_match for printer function
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Tue, 3 Mar 2015 09:52:25 +0000 (10:52 +0100)
committerFelipe Balbi <balbi@ti.com>
Tue, 10 Mar 2015 20:33:39 +0000 (15:33 -0500)
commit636bc0ed271d996e18365345e9c00fc712edc610
treee1f3e81a0266dbb7de5b1643674211c1b465de17
parentd7239f4c6daeb7a987a0e6f37a3ea24b37f7c208
usb: gadget: printer: add req_match for printer function

Verify that a given usb_ctrlrequest is meant for printer function.
The following parts of the request are tested:

- bmRequestType:Data transfer direction
- bmRequestType:Type
- bmRequestType:Recipient
- bRequest
- wValue for bRequest 1 and 2
- wLength

Additionally, the request is considered meant for this function
iff the decoded interface number matches dev->interface.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/legacy/printer.c