[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130215201101.GA24602@polaris.bitmath.org>
Date: Fri, 15 Feb 2013 21:11:01 +0100
From: "Henrik Rydberg" <rydberg@...omail.se>
To: Daniel Kurtz <djkurtz@...omium.org>
Cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
linux-input@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] Input: synaptics - initialize pointer emulation usage
> > @@ -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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists