[PATCH xf86-input-keyboard 2/2] Code cleanup, structure initialization.

Peter Hutterer peter.hutterer at who-t.net
Mon Oct 18 16:09:05 PDT 2010


On Mon, Oct 18, 2010 at 05:45:49PM -0400, Trevor Woerner wrote:
> From: Trevor Woerner <twoerner at gmail.com>
> 
> The InputDriverRec data structure in xserver/hw/xfree86/common/xf86Xinput.h
> no longer contains an integer refCount member.
> 
> Signed-off-by: Trevor Woerner <twoerner at gmail.com>
> ---
> 
> Is this better?
> 
>  src/kbd.c |   10 ++++++++--
>  1 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/src/kbd.c b/src/kbd.c
> index b5b3996..fd46783 100644
> --- a/src/kbd.c
> +++ b/src/kbd.c
> @@ -65,8 +65,11 @@ _X_EXPORT InputDriverRec KBD = {
>  	NULL,
>  	KbdPreInit,
>  	NULL,
> -	NULL,
> +	NULL
> +#if XORG_VERSION_CURRENT < 10999001
> +	    ,
>  	0
> +#endif
>  };
>  
>  _X_EXPORT InputDriverRec KEYBOARD = {
> @@ -75,8 +78,11 @@ _X_EXPORT InputDriverRec KEYBOARD = {
>  	NULL,
>  	KbdPreInit,
>  	NULL,
> -	NULL,
> +	NULL
> +#if XORG_VERSION_CURRENT < 10999001
> +	    ,
>  	0
> +#endif
>  };
>  
>  static const char *kbdDefaults[] = {
> -- 
> 1.7.3.1.104.gc752e

just for the archives, most of the more interesting answers are in the other
email at
http://lists.freedesktop.org/archives/xorg-devel/2010-October/014197.html

in the driver we don't care much about server versions, but about ABI
versions. so XORG_VERSION_CURRENT checks should be
GET_ABI_MAJOR(ABI_XINPUT_VERSION) checks instead.

Cheers,
  Peter


More information about the xorg-devel mailing list