Module Name:    xsrc
Committed By:   tsutsui
Date:           Sat Jul 18 15:37:02 UTC 2020

Modified Files:
        xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k: x68kKbd.c
            x68kMouse.c

Log Message:
Update for removal of AddEnabledDevice and RemoveEnabledDevice.

Use the NotifyFd API instead as per upstream commits:
 
https://cgit.freedesktop.org/xorg/xserver/commit/?id=55c2e1a3aa587c58a74066724e11e30b3df267b8
 
https://cgit.freedesktop.org/xorg/xserver/commit/?id=be5a513fee6cbf29ef7570e57eb0436d70fbd88c
 
https://cgit.freedesktop.org/xorg/xserver/commit/?id=60a91031d13e4d29c383087120e318f6b528b6e5
 
https://cgit.freedesktop.org/xorg/xserver/commit/?id=7def2fea30060d47780dc1eedc91fada5ae1934f


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
    xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c \
    xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c:1.4 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c:1.5
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c:1.4	Fri Apr 10 16:49:36 2020
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kKbd.c	Sat Jul 18 15:37:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kKbd.c,v 1.4 2020/04/10 16:49:36 tsutsui Exp $ */
+/* $NetBSD: x68kKbd.c,v 1.5 2020/07/18 15:37:02 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -87,6 +87,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 X68kKbdPriv x68kKbdPriv;
 DeviceIntPtr x68kKeyboardDevice = NULL;
 
+static void x68kKbdHandlerNotify(int, int, void *);
 static void x68kInitModMap(KeySymsRec *, CARD8 *);
 static void x68kInitKbdNames(XkbRMLVOSet *, X68kKbdPrivPtr);
 static void x68kKbdRingBell(DeviceIntPtr, int, int);
@@ -94,6 +95,11 @@ static void x68kKbdBell(int, DeviceIntPt
 static void x68kKbdCtrl(DeviceIntPtr, KeybdCtrl *);
 static void x68kSetLeds(X68kKbdPrivPtr, u_char);
 
+static void
+x68kKbdHandlerNotify(int fd __unused, int ready __unused, void *data __unused)
+{
+}
+
 /*------------------------------------------------------------------------
  * x68kKbdProc --
  *	Handle the initialization, etc. of a keyboard.
@@ -144,13 +150,14 @@ x68kKbdProc(DeviceIntPtr pDev, 	/* Keybo
                 return !Success;
             }
 	    x68kSetLeds(&x68kKbdPriv, (u_char)x68kKbdPriv.leds);
-            (void) AddEnabledDevice(x68kKbdPriv.fd);
+            SetNotifyFd(x68kKbdPriv.fd, x68kKbdHandlerNotify,
+		X_NOTIFY_READ, NULL);
             pKeyboard->on = TRUE;
             break;
 
         case DEVICE_CLOSE:
         case DEVICE_OFF:
-            RemoveEnabledDevice(x68kKbdPriv.fd);
+            RemoveNotifyFd(x68kKbdPriv.fd);
             pKeyboard->on = FALSE;
             break;
         default:
Index: xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c
diff -u xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c:1.4 xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c:1.5
--- xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c:1.4	Fri Apr 10 16:49:36 2020
+++ xsrc/external/mit/xorg-server/dist/hw/netbsd/x68k/x68kMouse.c	Sat Jul 18 15:37:02 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: x68kMouse.c,v 1.4 2020/04/10 16:49:36 tsutsui Exp $ */
+/* $NetBSD: x68kMouse.c,v 1.5 2020/07/18 15:37:02 tsutsui Exp $ */
 /*-------------------------------------------------------------------------
  * Copyright (c) 1996 Yasushi Yamasaki
  * All rights reserved.
@@ -87,6 +87,7 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
 #include <X11/Xatom.h>
 #include "xserver-properties.h"
 
+static void x68kMouseHandlerNotify(int, int, void *);
 static Bool x68kCursorOffScreen(ScreenPtr *, int *, int *);
 static void x68kCrossScreen(ScreenPtr, int);
 static void x68kWarpCursor(DeviceIntPtr, ScreenPtr, int, int);
@@ -102,6 +103,11 @@ DeviceIntPtr x68kPointerDevice = NULL;
 
 static X68kMousePriv x68kMousePriv;
 
+static void
+x68kMouseHandlerNotify(int fd __unused, int ready __unused, void *data __unused)
+{
+}
+
 /*-
  *-----------------------------------------------------------------------
  * x68kMouseProc --
@@ -162,13 +168,14 @@ x68kMouseProc(DeviceIntPtr device, int w
                 return !Success;
             }
 	    x68kMousePriv.bmask = 0;
-	    AddEnabledDevice(x68kMousePriv.fd);
+	    SetNotifyFd(x68kMousePriv.fd, x68kMouseHandlerNotify,
+		X_NOTIFY_READ, NULL);
 	    pMouse->on = TRUE;
 	    break;
 
 	case DEVICE_OFF:
 	    pMouse->on = FALSE;
-	    RemoveEnabledDevice(x68kMousePriv.fd);
+	    RemoveNotifyFd(x68kMousePriv.fd);
 	    break;
 
 	case DEVICE_CLOSE:

Reply via email to