diff options
author | Keyur Patel <iamkeyur96@gmail.com> | 2019-02-19 16:15:50 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-02-20 11:29:01 +0100 |
commit | 79595a734a68f768774d3e9ad6b5ad994413c578 (patch) | |
tree | 5e79f8996469e8101ddc79d072530d3058b91bc0 /drivers/usb/core | |
parent | 01fdf179f4b064d4c9d30b39aba178caf32649f4 (diff) |
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>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/devio.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/core/devio.c b/drivers/usb/core/devio.c index a12f2ce8df90..fa783531ee88 100644 --- a/drivers/usb/core/devio.c +++ b/drivers/usb/core/devio.c @@ -604,7 +604,7 @@ static void async_completed(struct urb *urb) snoop(&urb->dev->dev, "urb complete\n"); snoop_urb(urb->dev, as->userurb, urb->pipe, urb->actual_length, 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); if (as->status < 0 && as->bulk_addr && as->status != -ECONNRESET && |