u16 wIndex = ctrl->wIndex; u16 wValue = ctrl->wValue; u16 wLength = ctrl->wLength; 
u16 wIndex = le16_to_cpu(ctrl->wIndex); u16 wValue = le16_to_cpu(ctrl->wValue); u16 wLength = le16_to_cpu(ctrl->wLength); 
static int gs_setup_class(struct usb_gadget *gadget,	const struct usb_ctrlrequest *ctrl){	int ret = -EOPNOTSUPP;	struct gs_dev *dev = get_gadget_data(gadget);	struct gs_port *port = dev->dev_port[0];	/* ACM only has one port */	struct usb_request *req = dev->dev_ctrl_req;	u16 wIndex = ctrl->wIndex;	u16 wValue = ctrl->wValue;	u16 wLength = ctrl->wLength;	switch (ctrl->bRequest) {	case USB_CDC_REQ_SET_LINE_CODING:		ret = min(wLength,			(u16)sizeof(struct usb_cdc_line_coding));		if (port) {			spin_lock(&port->port_lock);			memcpy(&port->port_line_coding, req->buf, ret);			spin_unlock(&port->port_lock);		}		break;	case USB_CDC_REQ_GET_LINE_CODING:		port = dev->dev_port[0];	/* ACM only has one port */		ret = min(wLength,			(u16)sizeof(struct usb_cdc_line_coding));		if (port) {			spin_lock(&port->port_lock);			memcpy(req->buf, &port->port_line_coding, ret);			spin_unlock(&port->port_lock);		}		break;	case USB_CDC_REQ_SET_CONTROL_LINE_STATE:		ret = 0;		break;	default:		printk(KERN_ERR "gs_setup: unknown class request, type=%02x, request=%02x, value=%04x, index=%04x, length=%d\n",			ctrl->bRequestType, ctrl->bRequest,			wValue, wIndex, wLength);		break;	}	return ret;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1bbc169621cbe502b9143a27eb12802a0f1d43a0/serial.c/buggy/drivers/usb/gadget/serial.c