|
@@ -92,8 +92,27 @@ static int uhid_queue_event(struct uhid_device *uhid, __u32 event)
|
|
|
static int uhid_hid_start(struct hid_device *hid)
|
|
|
{
|
|
|
struct uhid_device *uhid = hid->driver_data;
|
|
|
+ struct uhid_event *ev;
|
|
|
+ unsigned long flags;
|
|
|
+
|
|
|
+ ev = kzalloc(sizeof(*ev), GFP_KERNEL);
|
|
|
+ if (!ev)
|
|
|
+ return -ENOMEM;
|
|
|
+
|
|
|
+ ev->type = UHID_START;
|
|
|
|
|
|
- return uhid_queue_event(uhid, UHID_START);
|
|
|
+ if (hid->report_enum[HID_FEATURE_REPORT].numbered)
|
|
|
+ ev->u.start.dev_flags |= UHID_DEV_NUMBERED_FEATURE_REPORTS;
|
|
|
+ if (hid->report_enum[HID_OUTPUT_REPORT].numbered)
|
|
|
+ ev->u.start.dev_flags |= UHID_DEV_NUMBERED_OUTPUT_REPORTS;
|
|
|
+ if (hid->report_enum[HID_INPUT_REPORT].numbered)
|
|
|
+ ev->u.start.dev_flags |= UHID_DEV_NUMBERED_INPUT_REPORTS;
|
|
|
+
|
|
|
+ spin_lock_irqsave(&uhid->qlock, flags);
|
|
|
+ uhid_queue(uhid, ev);
|
|
|
+ spin_unlock_irqrestore(&uhid->qlock, flags);
|
|
|
+
|
|
|
+ return 0;
|
|
|
}
|
|
|
|
|
|
static void uhid_hid_stop(struct hid_device *hid)
|