.. | .. |
---|
18 | 18 | |
---|
19 | 19 | req = (struct usb_ctrlrequest *) urb->setup_packet; |
---|
20 | 20 | |
---|
21 | | - return (req->bRequest == USB_REQ_CLEAR_FEATURE) && |
---|
22 | | - (req->bRequestType == USB_RECIP_ENDPOINT) && |
---|
23 | | - (req->wValue == USB_ENDPOINT_HALT); |
---|
| 21 | + return (req->bRequest == USB_REQ_CLEAR_FEATURE) && |
---|
| 22 | + (req->bRequestType == USB_RECIP_ENDPOINT) && |
---|
| 23 | + (req->wValue == USB_ENDPOINT_HALT); |
---|
24 | 24 | } |
---|
25 | 25 | |
---|
26 | 26 | static int is_set_interface_cmd(struct urb *urb) |
---|
.. | .. |
---|
138 | 138 | req = (struct usb_ctrlrequest *) urb->setup_packet; |
---|
139 | 139 | config = le16_to_cpu(req->wValue); |
---|
140 | 140 | |
---|
| 141 | + usb_lock_device(sdev->udev); |
---|
141 | 142 | err = usb_set_configuration(sdev->udev, config); |
---|
| 143 | + usb_unlock_device(sdev->udev); |
---|
142 | 144 | if (err && err != -ENODEV) |
---|
143 | 145 | dev_err(&sdev->udev->dev, "can't set config #%d, error %d\n", |
---|
144 | 146 | config, err); |
---|
.. | .. |
---|
424 | 426 | case USB_ENDPOINT_XFER_BULK: |
---|
425 | 427 | if (is_out) |
---|
426 | 428 | allowed |= URB_ZERO_PACKET; |
---|
427 | | - /* FALLTHROUGH */ |
---|
| 429 | + fallthrough; |
---|
428 | 430 | default: /* all non-iso endpoints */ |
---|
429 | 431 | if (!is_out) |
---|
430 | 432 | allowed |= URB_SHORT_NOT_OK; |
---|