[PATCH evdev 1/8] Remove support for kernel 2.4.
Peter Hutterer
peter.hutterer at who-t.net
Tue May 25 14:28:39 PDT 2010
On Tue, May 25, 2010 at 09:21:08AM -0700, Dan Nicholson wrote:
> On Sun, May 23, 2010 at 5:57 PM, Peter Hutterer
> <peter.hutterer at who-t.net> wrote:
> > It's been 6 years since 2.6, I doubt evdev would even work on 2.4 right now.
> >
> > Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> > ---
> > src/evdev.c | 32 +++-----------------------------
> > 1 files changed, 3 insertions(+), 29 deletions(-)
> >
> > diff --git a/src/evdev.c b/src/evdev.c
> > index ec65d64..6f1a646 100644
> > --- a/src/evdev.c
> > +++ b/src/evdev.c
> > @@ -66,20 +66,6 @@
> > #define MAXDEVICES MAX_DEVICES
> > #endif
> >
> > -/* 2.4 compatibility */
> > -#ifndef EVIOCGRAB
> > -#define EVIOCGRAB _IOW('E', 0x90, int)
> > -#endif
> > -
> > -#ifndef BTN_TASK
> > -#define BTN_TASK 0x117
> > -#endif
> > -
> > -#ifndef EV_SYN
> > -#define EV_SYN EV_RST
> > -#endif
> > -/* end compat */
> > -
> > #define ArrayLength(a) (sizeof(a) / (sizeof((a)[0])))
> >
> > #define MIN_KEYCODE 8
> > @@ -1779,19 +1765,12 @@ EvdevProbe(InputInfoPtr pInfo)
> > {
> > int i, has_rel_axes, has_abs_axes, has_keys, num_buttons, has_scroll;
> > int has_lmr; /* left middle right */
> > - int kernel24 = 0;
> > int ignore_abs = 0, ignore_rel = 0;
> > EvdevPtr pEvdev = pInfo->private;
> >
> > if (pEvdev->grabDevice && ioctl(pInfo->fd, EVIOCGRAB, (void *)1)) {
> > - if (errno == EINVAL) {
> > - /* keyboards are unsafe in 2.4 */
> > - kernel24 = 1;
> > - pEvdev->grabDevice = 0;
> > - } else {
> > xf86Msg(X_ERROR, "Grab failed. Device already configured?\n");
> > return 1;
> > - }
>
> Nitpick: remove one level of indentation now that the nesting is gone.
>
> Reviewed-by: Dan Nicholson <dbn.lists at gmail.com>
thanks, this is fixed by the follow up patch to move grabbing into it's own
function, so I don't feel like rebasing now :)
Cheers,
Peter
More information about the xorg-devel
mailing list