Re: [PATCH] input: fix ucb1x00-ts breakage after conversion to dynamic input_dev allocation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/9/05, Nicolas Pitre <[email protected]> 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 <[email protected]>
>
> ---
>
> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux