mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Nicolas Pitre <nico@cam.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>,
	Russell King <rmk@arm.linux.org.uk>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] input: fix ucb1x00-ts breakage after conversion to dynamic input_dev allocation
Date: Fri, 9 Dec 2005 16:08:26 -0500	[thread overview]
Message-ID: <d120d5000512091308lb633c0an34dee39af7f498ad@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0512091520000.26663@localhost.localdomain>

On 12/9/05, Nicolas Pitre <nico@cam.org> wrote:
> The bd622663192e8ebebb27dc1d9397f352a82d2495 commit broke the UCB1x00
> touchscreen driver since the idev structure was assumed to be into the
> ts structure, simply casting the former to the later in a couple places.
>
> This patch fixes those, and also cache the idev pointer between multiple
> calls to input_report_abs() to avoid growing the compiled code
> needlessly.
>
> Signed-off-by: Nicolas Pitre <nico@cam.org>
>
> ---
>
> diff --git a/drivers/mfd/ucb1x00-ts.c b/drivers/mfd/ucb1x00-ts.c
> index a984c0e..e0794c2 100644
> --- a/drivers/mfd/ucb1x00-ts.c
> +++ b/drivers/mfd/ucb1x00-ts.c
> @@ -59,16 +59,18 @@ static int adcsync;
>
>  static inline void ucb1x00_ts_evt_add(struct ucb1x00_ts *ts, u16 pressure, u16 x, u16 y)
>  {
> -       input_report_abs(ts->idev, ABS_X, x);
> -       input_report_abs(ts->idev, ABS_Y, y);
> -       input_report_abs(ts->idev, ABS_PRESSURE, pressure);
> -       input_sync(ts->idev);
> +       struct input_dev *idev = ts->idev;
> +       input_report_abs(idev, ABS_X, x);
> +       input_report_abs(idev, ABS_Y, y);
> +       input_report_abs(idev, ABS_PRESSURE, pressure);
> +       input_sync(idev);
>  }
>
>  static inline void ucb1x00_ts_event_release(struct ucb1x00_ts *ts)
>  {
> -       input_report_abs(ts->idev, ABS_PRESSURE, 0);
> -       input_sync(ts->idev);
> +       struct input_dev *idev = ts->idev;
> +       input_report_abs(idev, ABS_PRESSURE, 0);
> +       input_sync(idev);
>  }
>

The changes above are not really needed. The rest is good and we
should get it int before 2.6.15 I think.

Thanks!

--
Dmitry

  reply	other threads:[~2005-12-09 21:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-09 20:32 Nicolas Pitre
2005-12-09 21:08 ` Dmitry Torokhov [this message]
2005-12-09 22:25   ` Nicolas Pitre

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=d120d5000512091308lb633c0an34dee39af7f498ad@mail.gmail.com \
    --to=dmitry.torokhov@gmail.com \
    --cc=dtor_core@ameritech.net \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nico@cam.org \
    --cc=rmk@arm.linux.org.uk \
    /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

all inboxes | Powered by JetHome®