diff options
author | Vladimir Kondratyev <wulf@FreeBSD.org> | 2021-09-02 19:28:34 +0000 |
---|---|---|
committer | Vladimir Kondratyev <wulf@FreeBSD.org> | 2021-09-02 19:35:26 +0000 |
commit | 35bc295b30ef91f1835a0ee0225e8d957a9ebddd (patch) | |
tree | f23bba78d3bfa0b863b57712f132cdbc604af3c7 /sys/dev/evdev | |
parent | 4836af0d42cf9d299ba9203a835bdcfa797a74c2 (diff) | |
download | src-35bc295b30ef91f1835a0ee0225e8d957a9ebddd.tar.gz src-35bc295b30ef91f1835a0ee0225e8d957a9ebddd.zip |
Diffstat (limited to 'sys/dev/evdev')
-rw-r--r-- | sys/dev/evdev/evdev.h | 9 | ||||
-rw-r--r-- | sys/dev/evdev/evdev_mt.c | 18 |
2 files changed, 6 insertions, 21 deletions
diff --git a/sys/dev/evdev/evdev.h b/sys/dev/evdev/evdev.h index dde9bba9b1e2..589bd7cfe563 100644 --- a/sys/dev/evdev/evdev.h +++ b/sys/dev/evdev/evdev.h @@ -156,19 +156,12 @@ void evdev_set_flag(struct evdev_dev *, uint16_t); void *evdev_get_softc(struct evdev_dev *); /* Multitouch related functions: */ -int evdev_get_mt_slot_by_tracking_id(struct evdev_dev *, int32_t); -void evdev_support_mt_compat(struct evdev_dev *); -void evdev_push_mt_compat(struct evdev_dev *); +int evdev_mt_id_to_slot(struct evdev_dev *, int32_t); int evdev_mt_push_slot(struct evdev_dev *, int, union evdev_mt_slot *); int evdev_mt_push_frame(struct evdev_dev *, union evdev_mt_slot *, int); void evdev_mt_match_frame(struct evdev_dev *, union evdev_mt_slot *, int); union evdev_mt_slot *evdev_mt_get_match_slots(struct evdev_dev *); void evdev_mt_push_autorel(struct evdev_dev *); -static inline int -evdev_mt_id_to_slot(struct evdev_dev *evdev, int32_t id) -{ - return (evdev_get_mt_slot_by_tracking_id(evdev, id)); -} /* Utility functions: */ uint16_t evdev_hid2key(int); diff --git a/sys/dev/evdev/evdev_mt.c b/sys/dev/evdev/evdev_mt.c index 3030a60e098a..a3cb76cbbdb4 100644 --- a/sys/dev/evdev/evdev_mt.c +++ b/sys/dev/evdev/evdev_mt.c @@ -93,6 +93,7 @@ struct evdev_mt { union evdev_mt_slot slots[]; }; +static void evdev_mt_support_st_compat(struct evdev_dev *); static void evdev_mt_send_st_compat(struct evdev_dev *); static void evdev_mt_send_autorel(struct evdev_dev *); static void evdev_mt_replay_events(struct evdev_dev *); @@ -144,7 +145,7 @@ evdev_mt_init(struct evdev_dev *evdev) evdev_support_abs(evdev, ABS_MT_TRACKING_ID, -1, UINT16_MAX, 0, 0, 0); if (bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT)) - evdev_support_mt_compat(evdev); + evdev_mt_support_st_compat(evdev); } void @@ -517,7 +518,7 @@ evdev_mt_set_value(struct evdev_dev *evdev, int slot, int16_t code, } int -evdev_get_mt_slot_by_tracking_id(struct evdev_dev *evdev, int32_t tracking_id) +evdev_mt_id_to_slot(struct evdev_dev *evdev, int32_t tracking_id) { struct evdev_mt *mt = evdev->ev_mt; int slot; @@ -579,8 +580,8 @@ evdev_mt_normalize(int32_t value, int32_t mtmin, int32_t mtmax, int32_t stmax) return (value); } -void -evdev_support_mt_compat(struct evdev_dev *evdev) +static void +evdev_mt_support_st_compat(struct evdev_dev *evdev) { struct input_absinfo *ai; int i; @@ -650,15 +651,6 @@ evdev_mt_send_st_compat(struct evdev_dev *evdev) evdev_send_event(evdev, EV_ABS, ABS_PRESSURE, 0); } -void -evdev_push_mt_compat(struct evdev_dev *evdev) -{ - - EVDEV_ENTER(evdev); - evdev_mt_send_st_compat(evdev); - EVDEV_EXIT(evdev); -} - static void evdev_mt_send_autorel(struct evdev_dev *evdev) { |