mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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>
This commit is contained in:
parent
d93f27b732
commit
afd14cef01
1 changed files with 1 additions and 1 deletions
|
@ -1299,7 +1299,7 @@ hdm_probe(struct usb_interface *interface, const struct usb_device_id *id)
|
|||
tmp_cap->num_buffers_streaming = BUF_CHAIN_SIZE;
|
||||
tmp_cap->data_type = MOST_CH_CONTROL | MOST_CH_ASYNC |
|
||||
MOST_CH_ISOC_AVP | MOST_CH_SYNC;
|
||||
if (ep_desc->bEndpointAddress & USB_DIR_IN)
|
||||
if (usb_endpoint_dir_in(ep_desc))
|
||||
tmp_cap->direction = MOST_CH_RX;
|
||||
else
|
||||
tmp_cap->direction = MOST_CH_TX;
|
||||
|
|
Loading…
Reference in a new issue