Staging: most: Use usb_endpoint_dir_in(endpoint) instead of (endpoint->bEndpointAddre...
authorSandhya Bankar <bankarsandhya512@gmail.com>
Sun, 6 Mar 2016 10:20:35 +0000 (15:50 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Mar 2016 03:26:05 +0000 (19:26 -0800)
commitafd14cef0156bc5afb5f4a59bfec510a1ce87a4e
treef769dbc789c7faae9608b73868837190e4ed7383
parentd93f27b732062bbd7f93275613fc3f4081cda381
Staging: most: Use usb_endpoint_dir_in(endpoint) instead of (endpoint->bEndpointAddress & USB_DIR_IN).

Use usb_endpoint_dir_in(endpoint) instead of (endpoint->bEndpointAddress & USB_DIR_IN) to check if the endpoint has IN direction.
This correction is based on following semantic patch,

@@
struct usb_endpoint_descriptor *endpoint;
expression E;
@@

(
- endpoint->bEndpointAddress & USB_DIR_IN
+ usb_endpoint_dir_in(endpoint)
|
- endpoint->bEndpointAddress == USB_DIR_IN
+ usb_endpoint_dir_in(endpoint)
|
- (endpoint->bEndpointAddress & E) == USB_DIR_IN
+ usb_endpoint_dir_in(endpoint)
)

Signed-off-by: Sandhya Bankar <bankarsandhya512@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/most/hdm-usb/hdm_usb.c