usb: xhci: convert to TRB_TX_TYPE()

Use TRB_TX_TYPE() instead of (TRB_DATA_OUT/IN << TRB_TX_TYPE_SHIFT)

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
Chunfeng Yun 2020-09-08 19:00:01 +02:00 committed by Marek Vasut
parent 4312638eaf
commit bf58cf9ab1
2 changed files with 2 additions and 3 deletions

View File

@ -830,9 +830,9 @@ int xhci_ctrl_tx(struct usb_device *udev, unsigned long pipe,
if (ctrl->hci_version >= 0x100 || ctrl->quirks & XHCI_MTK_HOST) {
if (length > 0) {
if (req->requesttype & USB_DIR_IN)
field |= (TRB_DATA_IN << TRB_TX_TYPE_SHIFT);
field |= TRB_TX_TYPE(TRB_DATA_IN);
else
field |= (TRB_DATA_OUT << TRB_TX_TYPE_SHIFT);
field |= TRB_TX_TYPE(TRB_DATA_OUT);
}
}

View File

@ -879,7 +879,6 @@ struct xhci_event_cmd {
/* Control transfer TRB specific fields */
#define TRB_DIR_IN (1<<16)
#define TRB_TX_TYPE(p) ((p) << 16)
#define TRB_TX_TYPE_SHIFT (16)
#define TRB_DATA_OUT 2
#define TRB_DATA_IN 3