[PATCH synaptics 1/6] eventcomm: drop superflous helper function
Peter Hutterer
peter.hutterer at who-t.net
Mon Apr 21 18:09:12 PDT 2014
On Fri, Apr 18, 2014 at 11:55:24AM +0200, Hans de Goede wrote:
> Hi,
>
> On 04/09/2014 03:47 AM, Peter Hutterer wrote:
> > last_mt_vals_slot is only used in one location and there we can just use
> > cur_slot
> >
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
>
> Series looks good, series is:
>
> Reviewed-by: Hans de Goede <hdegoede at redhat.com>
>
> One remark about patches 5/6 and 6/6, in the mean time we've gotten
> more pnp-ids / dmi strings, so you may wish to add those too and
> squash them in.
>
> I've been keeping a little text file with up2date info on these
> laptops, I've attached it to this mail.
>
> Note the T430u does not have top buttons, it is in the file
> because it too advertises wrong min values.
thanks, I've merged the missing ones into the fdi file, squashed it together and pushed
it. so 5/6 and 6/6 are now a single patch only, I felt lazy.
Cheers,
Peter
> > ---
> > src/eventcomm.c | 12 +-----------
> > 1 file changed, 1 insertion(+), 11 deletions(-)
> >
> > diff --git a/src/eventcomm.c b/src/eventcomm.c
> > index 858efeb..5030150 100644
> > --- a/src/eventcomm.c
> > +++ b/src/eventcomm.c
> > @@ -110,16 +110,6 @@ EventProtoDataAlloc(int fd)
> > 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
> > UninitializeTouch(InputInfoPtr pInfo)
> > {
> > @@ -549,7 +539,7 @@ EventProcessTouchEvent(InputInfoPtr pInfo, struct SynapticsHwState *hw,
> > proto_data->cur_slot = ev->value;
> > }
> > else {
> > - int slot_index = last_mt_vals_slot(priv);
> > + int slot_index = proto_data->cur_slot;
> >
> > if (slot_index < 0)
> > return;
> >
> dmi pnp-id range Firmware id
> Thinkpad T430u LEN0051 {1254, 5702, 1228, 4714}* Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 0xd004a3/0x940300/0x126c00, board id: 2228, fw id: 1323666
>
> ThinkPad Helix* LEN0033 {1024, 5052, 2258, 4832}
>
> ThinkPad X240* LEN0035 {1232, 5710, 1156, 4696}
> ThinkPad S1 Yoga LEN0042 {1232, 5710, 1156, 4696}
>
> ThinkPad T431* LEN0034 {1024, 5112, 2024, 4832}
> ThinkPad L440* LEN2004 {1024, 5112, 2024, 4832} Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 0xd001a3/0x940300/0x127c00, board id: 2722, fw id: 1484859
> ThinkPad T440* LEN0036 {1024, 5112, 2024, 4832}
> ThinkPad L540 LEN2004 {1024, 5112, 2024, 4832} Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 0xd001a3/0x940300/0x127c00, board id: 2722, fw id: 1484859
> ThinkPad T540* LEN0034 {1024, 5056, 2058, 4832} ** Touchpad model: 1, fw: 8.1, id: 0x1e2b1, caps: 0xd001a3/0x940300/0x127c00, board id: 2722, fw id: 1484859
> ThinkPad X1 Carbon 2nd* LEN0034 {1024, 5112, 2024, 4832}
>
> * We don't have a quirk for this one in the kernel
> ** Should very likely be the same as all the others with a LEN0034 pnp-id
More information about the xorg-devel
mailing list