Merge branches 'for-4.0/upstream-fixes', 'for-4.1/genius', 'for-4.1/huion-uclogic...
[cascardo/linux.git] / drivers / hid / hid-debug.c
index 8bf61d2..c785095 100644 (file)
@@ -165,6 +165,7 @@ static const struct hid_usage_entry hid_usage_table[] = {
     {0, 0x53, "DeviceIndex"},
     {0, 0x54, "ContactCount"},
     {0, 0x55, "ContactMaximumNumber"},
+    {0, 0x59, "ButtonType"},
     {0, 0x5A, "SecondaryBarrelSwitch"},
     {0, 0x5B, "TransducerSerialNumber"},
   { 15, 0, "PhysicalInterfaceDevice" },
@@ -1127,7 +1128,8 @@ static ssize_t hid_debug_events_read(struct file *file, char __user *buffer,
 
                                if (!list->hdev || !list->hdev->debug) {
                                        ret = -EIO;
-                                       break;
+                                       set_current_state(TASK_RUNNING);
+                                       goto out;
                                }
 
                                /* allow O_NONBLOCK from other threads */