linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Henrik Rydberg" <rydberg@euromail.se>
To: Daniel Kurtz <djkurtz@chromium.org>
Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] Input: synaptics - initialize pointer emulation usage
Date: Fri, 15 Feb 2013 21:11:01 +0100	[thread overview]
Message-ID: <20130215201101.GA24602@polaris.bitmath.org> (raw)
In-Reply-To: <CAGS+omC2Yemvo-kE9tYOmE4rou4fi2iNOXw3v3c+A91_kiUzfQ@mail.gmail.com>

> > @@ -1247,11 +1247,11 @@ static void set_input_params(struct input_dev *dev, struct synaptics_data *priv)
> >         input_set_abs_params(dev, ABS_PRESSURE, 0, 255, 0, 0);
> >
> >         if (SYN_CAP_IMAGE_SENSOR(priv->ext_cap_0c)) {
> > -               input_mt_init_slots(dev, 2, 0);
> >                 set_abs_position_params(dev, priv, ABS_MT_POSITION_X,
> >                                         ABS_MT_POSITION_Y);
> >                 /* Image sensors can report per-contact pressure */
> >                 input_set_abs_params(dev, ABS_MT_PRESSURE, 0, 255, 0, 0);
> > +               input_mt_init_slots(dev, 2, INPUT_MT_POINTER);
> 
> ABS_X/Y/PRESSURE are already init'ed in the common code a few lines
> above the if ().
> Perhaps you could refactor things a bit to only define them once?

I looked into it, of course, but there are many other values (event
bits, event properties) that also get duplicated. Treating them the
same way leads to a fairly large patch, for a small change in
truth. The present patch is the balanced optimum, IMHO. It is also
easy to prove.

Henrik

  reply	other threads:[~2013-02-15 20:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-15 19:36 [PATCH 1/2] Input: MT - do not apply filtering on emulated events Henrik Rydberg
2013-02-15 19:36 ` [PATCH 2/2] Input: synaptics - initialize pointer emulation usage Henrik Rydberg
2013-02-15 19:54   ` Daniel Kurtz
2013-02-15 20:11     ` Henrik Rydberg [this message]
2013-02-16  2:54   ` Dmitry Torokhov
2013-02-15 19:47 ` [PATCH 1/2] Input: MT - do not apply filtering on emulated events Daniel Kurtz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130215201101.GA24602@polaris.bitmath.org \
    --to=rydberg@euromail.se \
    --cc=djkurtz@chromium.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).