forked from luck/tmp_suning_uos_patched
Merge branch 'for-4.19/upstream' into for-linus
Assorted small driver/core fixes.
This commit is contained in:
commit
a91ddf23e2
|
@ -955,6 +955,8 @@ static int ntrig_probe(struct hid_device *hdev, const struct hid_device_id *id)
|
|||
|
||||
ret = sysfs_create_group(&hdev->dev.kobj,
|
||||
&ntrig_attribute_group);
|
||||
if (ret)
|
||||
hid_err(hdev, "cannot create sysfs group\n");
|
||||
|
||||
return 0;
|
||||
err_free:
|
||||
|
|
|
@ -44,29 +44,6 @@ static __u8 *redragon_report_fixup(struct hid_device *hdev, __u8 *rdesc,
|
|||
return rdesc;
|
||||
}
|
||||
|
||||
static int redragon_probe(struct hid_device *dev,
|
||||
const struct hid_device_id *id)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = hid_parse(dev);
|
||||
if (ret) {
|
||||
hid_err(dev, "parse failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* do not register unused input device */
|
||||
if (dev->maxapplication == 1)
|
||||
return 0;
|
||||
|
||||
ret = hid_hw_start(dev, HID_CONNECT_DEFAULT);
|
||||
if (ret) {
|
||||
hid_err(dev, "hw start failed\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
static const struct hid_device_id redragon_devices[] = {
|
||||
{HID_USB_DEVICE(USB_VENDOR_ID_JESS, USB_DEVICE_ID_REDRAGON_ASURA)},
|
||||
{}
|
||||
|
@ -77,8 +54,7 @@ MODULE_DEVICE_TABLE(hid, redragon_devices);
|
|||
static struct hid_driver redragon_driver = {
|
||||
.name = "redragon",
|
||||
.id_table = redragon_devices,
|
||||
.report_fixup = redragon_report_fixup,
|
||||
.probe = redragon_probe
|
||||
.report_fixup = redragon_report_fixup
|
||||
};
|
||||
|
||||
module_hid_driver(redragon_driver);
|
||||
|
|
|
@ -298,7 +298,6 @@ int ishtp_hbm_cl_flow_control_req(struct ishtp_device *dev,
|
|||
struct ishtp_msg_hdr *ishtp_hdr = &hdr;
|
||||
const size_t len = sizeof(struct hbm_flow_control);
|
||||
int rv;
|
||||
unsigned int num_frags;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&cl->fc_spinlock, flags);
|
||||
|
@ -314,7 +313,6 @@ int ishtp_hbm_cl_flow_control_req(struct ishtp_device *dev,
|
|||
return 0;
|
||||
}
|
||||
|
||||
num_frags = cl->recv_msg_num_frags;
|
||||
cl->recv_msg_num_frags = 0;
|
||||
|
||||
rv = ishtp_write_message(dev, ishtp_hdr, data);
|
||||
|
|
|
@ -480,6 +480,7 @@ static void hid_ctrl(struct urb *urb)
|
|||
{
|
||||
struct hid_device *hid = urb->context;
|
||||
struct usbhid_device *usbhid = hid->driver_data;
|
||||
unsigned long flags;
|
||||
int unplug = 0, status = urb->status;
|
||||
|
||||
switch (status) {
|
||||
|
@ -501,7 +502,7 @@ static void hid_ctrl(struct urb *urb)
|
|||
hid_warn(urb->dev, "ctrl urb status %d received\n", status);
|
||||
}
|
||||
|
||||
spin_lock(&usbhid->lock);
|
||||
spin_lock_irqsave(&usbhid->lock, flags);
|
||||
|
||||
if (unplug) {
|
||||
usbhid->ctrltail = usbhid->ctrlhead;
|
||||
|
@ -511,13 +512,13 @@ static void hid_ctrl(struct urb *urb)
|
|||
if (usbhid->ctrlhead != usbhid->ctrltail &&
|
||||
hid_submit_ctrl(hid) == 0) {
|
||||
/* Successfully submitted next urb in queue */
|
||||
spin_unlock(&usbhid->lock);
|
||||
spin_unlock_irqrestore(&usbhid->lock, flags);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
clear_bit(HID_CTRL_RUNNING, &usbhid->iofl);
|
||||
spin_unlock(&usbhid->lock);
|
||||
spin_unlock_irqrestore(&usbhid->lock, flags);
|
||||
usb_autopm_put_interface_async(usbhid->intf);
|
||||
wake_up(&usbhid->wait);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user