Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Sep 2021 19:35:54 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 35bc295b30ef - main - evdev: Do not export multitouch functions which are unused outside evdev
Message-ID:  <202109021935.182JZswS064140@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=35bc295b30ef91f1835a0ee0225e8d957a9ebddd

commit 35bc295b30ef91f1835a0ee0225e8d957a9ebddd
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2021-09-02 19:28:34 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2021-09-02 19:35:26 +0000

    evdev: Do not export multitouch functions which are unused outside evdev
---
 sys/dev/evdev/evdev.h    |  9 +--------
 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)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109021935.182JZswS064140>