USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein
authorAndrey Konovalov <andreyknvl@google.com>
Mon, 21 Oct 2019 14:20:59 +0000 (16:20 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 12 Jan 2020 11:21:10 +0000 (12:21 +0100)
commit61e861528ec14a0faa07e8152906aeefe7204236
tree21f1169824da341f239ba50a01722f9c33f3dfdf
parent7a02c193298ec15f2ba1344b6bcd5d578a41b2e0
USB: dummy-hcd: use usb_urb_dir_in instead of usb_pipein

commit 6dabeb891c001c592645df2f477fed9f5d959987 upstream.

Commit fea3409112a9 ("USB: add direction bit to urb->transfer_flags") has
added a usb_urb_dir_in() helper function that can be used to determine
the direction of the URB. With that patch USB_DIR_IN control requests with
wLength == 0 are considered out requests by real USB HCDs. This patch
changes dummy-hcd to use the usb_urb_dir_in() helper to match that
behavior.

Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Link: https://lore.kernel.org/r/4ae9e68ebca02f08a93ac61fe065057c9a01f0a8.1571667489.git.andreyknvl@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc/dummy_hcd.c