diff options
author | Mathias Nyman <mathias.nyman@linux.intel.com> | 2016-11-11 15:13:28 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-11-14 10:18:22 +0100 |
commit | 5071e6b279178f7d25e1aebd23f49f686657a5fb (patch) | |
tree | 52da956ffaf401fb9877f32c9e050e7e7002916b /drivers/usb/host/xhci.c | |
parent | 3f1dae6b19c9b4ba51ad016e30ec17399819bb6d (diff) |
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.c | 3 |
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 */ |