lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d120d5000612221235g3df0167bx9b1e6664dadf138d@mail.gmail.com>
Date:	Fri, 22 Dec 2006 15:35:23 -0500
From:	"Dmitry Torokhov" <dmitry.torokhov@...il.com>
To:	"David Brownell" <david-b@...bell.net>
Cc:	nicolas.ferre@....atmel.com, linux-kernel@...r.kernel.org
Subject: Re: [patch 2.6.20-rc1 6/6] input: ads7846 directly senses PENUP state

On 12/22/06, David Brownell <david-b@...bell.net> wrote:
>
> +static void ads7846_report_pen_state(struct ads7846 *ts, int down)
> +{
> +       struct input_dev        *input_dev = ts->input;
> +
> +       input_report_key(input_dev, BTN_TOUCH, down);
> +       if (!down)
> +               input_report_abs(input_dev, ABS_PRESSURE, 0);
> +#ifdef VERBOSE
> +       pr_debug("%s: %s\n", ts->spi->dev.bus_id, down ? "DOWN" : "UP");
> +#endif
> +}
> +
> +static void ads7846_report_pen_position(struct ads7846 *ts, int x, int y,
> +                                       int pressure)
> +{
> +       struct input_dev        *input_dev = ts->input;
> +
> +       input_report_abs(input_dev, ABS_X, x);
> +       input_report_abs(input_dev, ABS_Y, y);
> +       input_report_abs(input_dev, ABS_PRESSURE, pressure);
> +
> +#ifdef VERBOSE
> +       pr_debug("%s: %d/%d/%d\n", ts->spi->dev.bus_id, x, y, pressure);
> +#endif
> +}
> +
> +static void ads7846_sync_events(struct ads7846 *ts)
> +{
> +       struct input_dev        *input_dev = ts->input;
> +
> +       input_sync(input_dev);
> +}

I think these helpers just obfuscate the code, just call
input_report_*() and input_sync() drectly like you used to do.

-- 
Dmitry
-
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ