Revert "FROMLIST: usb: gadget: f_uac1: Fix endpoint reading"

This reverts commit d390fcf2f7.

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I96f63c724254ac46dab01360341e71587e9bb2ea
This commit is contained in:
Tao Huang
2021-12-01 19:54:33 +08:00
parent e12828d267
commit f6bf4fa1ed

View File

@@ -337,7 +337,7 @@ static int audio_set_endpoint_req(struct usb_function *f,
{
struct usb_composite_dev *cdev = f->config->cdev;
int value = -EOPNOTSUPP;
u8 ep = le16_to_cpu(ctrl->wIndex) & 0xff;
u16 ep = le16_to_cpu(ctrl->wIndex);
u16 len = le16_to_cpu(ctrl->wLength);
u16 w_value = le16_to_cpu(ctrl->wValue);
@@ -373,7 +373,7 @@ static int audio_get_endpoint_req(struct usb_function *f,
{
struct usb_composite_dev *cdev = f->config->cdev;
int value = -EOPNOTSUPP;
u8 ep = le16_to_cpu(ctrl->wIndex) & 0xff;
u8 ep = ((le16_to_cpu(ctrl->wIndex) >> 8) & 0xFF);
u16 len = le16_to_cpu(ctrl->wLength);
u16 w_value = le16_to_cpu(ctrl->wValue);