evdev: Do not export multitouch functions which are unused outside evdev

This commit is contained in:
Vladimir Kondratyev 2021-09-02 22:28:34 +03:00
parent 4836af0d42
commit 35bc295b30
2 changed files with 6 additions and 21 deletions

View File

@ -156,19 +156,12 @@ void evdev_set_flag(struct evdev_dev *, uint16_t);
void *evdev_get_softc(struct evdev_dev *); void *evdev_get_softc(struct evdev_dev *);
/* Multitouch related functions: */ /* Multitouch related functions: */
int evdev_get_mt_slot_by_tracking_id(struct evdev_dev *, int32_t); int evdev_mt_id_to_slot(struct evdev_dev *, int32_t);
void evdev_support_mt_compat(struct evdev_dev *);
void evdev_push_mt_compat(struct evdev_dev *);
int evdev_mt_push_slot(struct evdev_dev *, int, union evdev_mt_slot *); 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); 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); 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 *); union evdev_mt_slot *evdev_mt_get_match_slots(struct evdev_dev *);
void evdev_mt_push_autorel(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: */ /* Utility functions: */
uint16_t evdev_hid2key(int); uint16_t evdev_hid2key(int);

View File

@ -93,6 +93,7 @@ struct evdev_mt {
union evdev_mt_slot slots[]; 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_st_compat(struct evdev_dev *);
static void evdev_mt_send_autorel(struct evdev_dev *); static void evdev_mt_send_autorel(struct evdev_dev *);
static void evdev_mt_replay_events(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, evdev_support_abs(evdev,
ABS_MT_TRACKING_ID, -1, UINT16_MAX, 0, 0, 0); ABS_MT_TRACKING_ID, -1, UINT16_MAX, 0, 0, 0);
if (bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT)) if (bit_test(evdev->ev_flags, EVDEV_FLAG_MT_STCOMPAT))
evdev_support_mt_compat(evdev); evdev_mt_support_st_compat(evdev);
} }
void void
@ -517,7 +518,7 @@ evdev_mt_set_value(struct evdev_dev *evdev, int slot, int16_t code,
} }
int 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; struct evdev_mt *mt = evdev->ev_mt;
int slot; int slot;
@ -579,8 +580,8 @@ evdev_mt_normalize(int32_t value, int32_t mtmin, int32_t mtmax, int32_t stmax)
return (value); return (value);
} }
void static void
evdev_support_mt_compat(struct evdev_dev *evdev) evdev_mt_support_st_compat(struct evdev_dev *evdev)
{ {
struct input_absinfo *ai; struct input_absinfo *ai;
int i; int i;
@ -650,15 +651,6 @@ evdev_mt_send_st_compat(struct evdev_dev *evdev)
evdev_send_event(evdev, EV_ABS, ABS_PRESSURE, 0); 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 static void
evdev_mt_send_autorel(struct evdev_dev *evdev) evdev_mt_send_autorel(struct evdev_dev *evdev)
{ {