aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/evdev/evdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/evdev/evdev.c')
-rw-r--r--sys/dev/evdev/evdev.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/sys/dev/evdev/evdev.c b/sys/dev/evdev/evdev.c
index 2fd7c2e201ea..a0a039f0b691 100644
--- a/sys/dev/evdev/evdev.c
+++ b/sys/dev/evdev/evdev.c
@@ -1094,6 +1094,17 @@ evdev_release_client(struct evdev_dev *evdev, struct evdev_client *client)
return (0);
}
+bool
+evdev_is_grabbed(struct evdev_dev *evdev)
+{
+ /*
+ * The function is intended to be called from evdev-unrelated parts of
+ * code like syscons-compatible parts of mouse and keyboard drivers.
+ * That makes unlocked read-only access acceptable.
+ */
+ return (evdev->ev_grabber != NULL);
+}
+
static void
evdev_repeat_callout(void *arg)
{