summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/xhci.c
diff options
context:
space:
mode:
authorMathias Nyman2016-11-11 14:13:28 +0100
committerGreg Kroah-Hartman2016-11-14 10:18:22 +0100
commit5071e6b279178f7d25e1aebd23f49f686657a5fb (patch)
tree52da956ffaf401fb9877f32c9e050e7e7002916b /drivers/usb/host/xhci.c
parentusb: host: xhci: plat: add support for Renesas r8a7796 SoC (diff)
downloadkernel-qcow2-linux-5071e6b279178f7d25e1aebd23f49f686657a5fb.tar.gz
kernel-qcow2-linux-5071e6b279178f7d25e1aebd23f49f686657a5fb.tar.xz
kernel-qcow2-linux-5071e6b279178f7d25e1aebd23f49f686657a5fb.zip
xhci: add helper to get the endpoint state of a endpoint context
define GET_EP_CTX_STATE() macro to get the endpoint state from a pointer to a le32 enpoint context structure No functional changes Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host/xhci.c')
-rw-r--r--drivers/usb/host/xhci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index 641663f18fdb..ea338e05ae27 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -1650,8 +1650,7 @@ int xhci_drop_endpoint(struct usb_hcd *hcd, struct usb_device *udev,
/* If the HC already knows the endpoint is disabled,
* or the HCD has noted it is disabled, ignore this request
*/
- if (((ep_ctx->ep_info & cpu_to_le32(EP_STATE_MASK)) ==
- cpu_to_le32(EP_STATE_DISABLED)) ||
+ if ((GET_EP_CTX_STATE(ep_ctx) == EP_STATE_DISABLED) ||
le32_to_cpu(ctrl_ctx->drop_flags) &
xhci_get_endpoint_flag(&ep->desc)) {
/* Do not warn when called after a usb_device_reset */