aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/evdev/evdev_mt.c
diff options
context:
space:
mode:
authorOleksandr Tymoshenko <gonzo@FreeBSD.org>2016-10-08 17:58:26 +0000
committerOleksandr Tymoshenko <gonzo@FreeBSD.org>2016-10-08 17:58:26 +0000
commitbfbd1bb744b0f1091f0cd14467ec7d8b51560bee (patch)
tree15b9c8641523314db1de35528ac5e4e1237ef8a8 /sys/dev/evdev/evdev_mt.c
parentccb890b548216f9aa686131489d00d32a2ed55ea (diff)
Notes
Diffstat (limited to 'sys/dev/evdev/evdev_mt.c')
-rw-r--r--sys/dev/evdev/evdev_mt.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/sys/dev/evdev/evdev_mt.c b/sys/dev/evdev/evdev_mt.c
index 1ff332cbaf30..ef36006ddaf6 100644
--- a/sys/dev/evdev/evdev_mt.c
+++ b/sys/dev/evdev/evdev_mt.c
@@ -227,9 +227,13 @@ void
evdev_push_nfingers(struct evdev_dev *evdev, int32_t nfingers)
{
- EVDEV_LOCK(evdev);
+ if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
+ EVDEV_LOCK(evdev);
+ else
+ EVDEV_LOCK_ASSERT(evdev);
evdev_send_nfingers(evdev, nfingers);
- EVDEV_UNLOCK(evdev);
+ if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
+ EVDEV_UNLOCK(evdev);
}
void
@@ -263,7 +267,11 @@ void
evdev_push_mt_compat(struct evdev_dev *evdev)
{
- EVDEV_LOCK(evdev);
+ if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
+ EVDEV_LOCK(evdev);
+ else
+ EVDEV_LOCK_ASSERT(evdev);
evdev_send_mt_compat(evdev);
- EVDEV_UNLOCK(evdev);
+ if (evdev->ev_lock_type == EV_LOCK_INTERNAL)
+ EVDEV_UNLOCK(evdev);
}