usb: core: Replace hardcoded check with inline function from usb.h
Expression (urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN can be replaced by usb_urb_dir_in(struct urb *urb) from usb.h for better readability. Signed-off-by: Keyur Patel <iamkeyur96@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
01fdf179f4
Коммит
79595a734a
|
@ -604,7 +604,7 @@ static void async_completed(struct urb *urb)
|
||||||
snoop(&urb->dev->dev, "urb complete\n");
|
snoop(&urb->dev->dev, "urb complete\n");
|
||||||
snoop_urb(urb->dev, as->userurb, urb->pipe, urb->actual_length,
|
snoop_urb(urb->dev, as->userurb, urb->pipe, urb->actual_length,
|
||||||
as->status, COMPLETE, NULL, 0);
|
as->status, COMPLETE, NULL, 0);
|
||||||
if ((urb->transfer_flags & URB_DIR_MASK) == URB_DIR_IN)
|
if (usb_urb_dir_in(urb))
|
||||||
snoop_urb_data(urb, urb->actual_length);
|
snoop_urb_data(urb, urb->actual_length);
|
||||||
|
|
||||||
if (as->status < 0 && as->bulk_addr && as->status != -ECONNRESET &&
|
if (as->status < 0 && as->bulk_addr && as->status != -ECONNRESET &&
|
||||||
|
|
Загрузка…
Ссылка в новой задаче