Skip to content

Commit

Permalink
Merge branch 'for-4.19/upstream' into for-linus
Browse files Browse the repository at this point in the history
Assorted small driver/core fixes.
  • Loading branch information
Jiri Kosina committed Aug 20, 2018
2 parents 78a8ad7 + 7f342e9 commit a91ddf2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 deletions.
2 changes: 2 additions & 0 deletions drivers/hid/hid-ntrig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 1 addition & 25 deletions drivers/hid/hid-redragon.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)},
{}
Expand All @@ -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);
Expand Down
2 changes: 0 additions & 2 deletions drivers/hid/intel-ish-hid/ishtp/hbm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down
7 changes: 4 additions & 3 deletions drivers/hid/usbhid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
Expand All @@ -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);
}
Expand Down

0 comments on commit a91ddf2

Please sign in to comment.