Commit bec41416 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

eventcomm: drop superflous helper function



last_mt_vals_slot is only used in one location and there we can just use
cur_slot
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
parent f1948e08
...@@ -110,16 +110,6 @@ EventProtoDataAlloc(int fd) ...@@ -110,16 +110,6 @@ EventProtoDataAlloc(int fd)
return proto_data; return proto_data;
} }
static int
last_mt_vals_slot(const SynapticsPrivate * priv)
{
struct eventcomm_proto_data *proto_data =
(struct eventcomm_proto_data *) priv->proto_data;
int value = proto_data->cur_slot;
return value < priv->num_slots ? value : -1;
}
static void static void
UninitializeTouch(InputInfoPtr pInfo) UninitializeTouch(InputInfoPtr pInfo)
{ {
...@@ -549,7 +539,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw, ...@@ -549,7 +539,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
proto_data->cur_slot = ev->value; proto_data->cur_slot = ev->value;
} }
else { else {
int slot_index = last_mt_vals_slot(priv); int slot_index = proto_data->cur_slot;
if (slot_index < 0) if (slot_index < 0)
return; return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment