]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5514d594f38d450655ca9aa3c1df42d2a41c00cf
treee1f3e81a0266dbb7de5b1643674211c1b465de17
parent049605f84d9f0b3ce65e20dbabddea03f3533f53
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