Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1debfb33 authored by Chase Douglas's avatar Chase Douglas Committed by Jiri Kosina
Browse files

HID: debugfs: wake up reading tasks upon event



Some devices poke the hid core in a way that causes hid_debug_event to
be called, while never calling hid_dump_input. Without this wakeup
addition, tasks reading for hid events through debugfs may never see any
events. It may be that a well written driver doesn't cause this, but
then what's the point of debugfs?

Signed-off-by: default avatarChase Douglas <chase.douglas@canonical.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 816651a7
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -570,6 +570,8 @@ void hid_debug_event(struct hid_device *hdev, char *buf)
				buf[i];
				buf[i];
		list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
		list->tail = (list->tail + i) % HID_DEBUG_BUFSIZE;
        }
        }

	wake_up_interruptible(&hdev->debug_wait);
}
}
EXPORT_SYMBOL_GPL(hid_debug_event);
EXPORT_SYMBOL_GPL(hid_debug_event);