$NetBSD: patch-ac,v 1.1 2009/03/14 11:12:32 apb Exp $

Changes from NetBSD xsrc/external/mit/xf86-input-keyboard/dist/\
src/bsd_kbd.c

----------------------------
revision 1.4
date: 2009/02/07 17:33:28;  author: christos;  state: Exp;  lines: +7 -0
Set the version for the keyboard too. From Patrick Welche
----------------------------

--- src/bsd_kbd.c.orig	2008-12-04 00:01:46.000000000 +0200
+++ src/bsd_kbd.c
@@ -454,6 +454,13 @@ OpenKeyboard(InputInfoPtr pInfo)
 #ifdef WSCONS_SUPPORT
     if( prot == PROT_WSCONS) {
        pKbd->consType = WSCONS;
+#ifdef WSKBDIO_SETVERSION
+       int version = WSKBDIO_EVENT_VERSION;
+       if (ioctl(pInfo->fd, WSKBDIO_SETVERSION, &version) == -1) {
+           xf86Msg(X_WARNING, "%s: cannot set version\n", pInfo->name);
+           return FALSE;
+       }
+#endif 
        /* Find out keyboard type */
        if (ioctl(pInfo->fd, WSKBDIO_GTYPE, &(pKbd->wsKbdType)) == -1) {
            xf86Msg(X_ERROR, "%s: cannot get keyboard type", pInfo->name);
