[PATCH libevdev 1/2] include: update linux/input.h for kernel 3.12

David Herrmann dh.herrmann at gmail.com
Wed Jan 8 04:11:33 PST 2014


Hi

3.13 will add some more defines, but lets wait for the final release.
For this patch:
Reviewed-by: David Herrmann <dh.herrmann at gmail.com>

Thanks
David

On Wed, Jan 8, 2014 at 2:28 AM, Peter Hutterer <peter.hutterer at who-t.net> wrote:
> Signed-off-by: Peter Hutterer <peter.hutterer at who-t.net>
> ---
>  include/linux/input.h        | 3 +++
>  libevdev/make-event-names.py | 4 ----
>  test/test-event-names.c      | 3 +--
>  3 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/include/linux/input.h b/include/linux/input.h
> index 38fe79f..ba88cec 100644
> --- a/include/linux/input.h
> +++ b/include/linux/input.h
> @@ -150,6 +150,7 @@ struct input_keymap_entry {
>  #define EVIOCGEFFECTS          _IOR('E', 0x84, int)                    /* Report number of effects playable at the same time */
>
>  #define EVIOCGRAB              _IOW('E', 0x90, int)                    /* Grab/Release device */
> +#define EVIOCREVOKE            _IOW('E', 0x91, int)                    /* Revoke device access */
>
>  #define EVIOCSCLOCKID          _IOW('E', 0xa0, int)                    /* Set clockid to be used for timestamps */
>
> @@ -192,6 +193,8 @@ struct input_keymap_entry {
>  #define SYN_CONFIG             1
>  #define SYN_MT_REPORT          2
>  #define SYN_DROPPED            3
> +#define SYN_MAX                        0xf
> +#define SYN_CNT                        (SYN_MAX+1)
>
>  /*
>   * Keys and buttons
> diff --git a/libevdev/make-event-names.py b/libevdev/make-event-names.py
> index 8f65ab8..0dea9d6 100755
> --- a/libevdev/make-event-names.py
> +++ b/libevdev/make-event-names.py
> @@ -157,10 +157,6 @@ def print_mapping_table(bits):
>         print("#ifndef EVENT_NAMES_H")
>         print("#define EVENT_NAMES_H")
>         print("")
> -       print("#ifndef SYN_MAX /* added in 3.12  */")
> -       print("#define SYN_MAX 0xf")
> -       print("#endif")
> -       print("")
>
>         for prefix in prefixes:
>                 if prefix == "BTN_":
> diff --git a/test/test-event-names.c b/test/test-event-names.c
> index 9aa3dfb..903e152 100644
> --- a/test/test-event-names.c
> +++ b/test/test-event-names.c
> @@ -190,8 +190,7 @@ START_TEST(test_code_syn_name)
>         ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_CONFIG), "SYN_CONFIG");
>         ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_MT_REPORT), "SYN_MT_REPORT");
>         ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_DROPPED), "SYN_DROPPED");
> -
> -       /* there is no SYN_MAX */
> +       ck_assert_str_eq(libevdev_event_code_get_name(EV_SYN, SYN_MAX), "SYN_MAX");
>  }
>  END_TEST
>
> --
> 1.8.4.2
>
> _______________________________________________
> Input-tools mailing list
> Input-tools at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/input-tools


More information about the Input-tools mailing list