Module Name:    src
Committed By:   riastradh
Date:           Sun Jan 26 22:34:17 UTC 2020

Modified Files:
        src/sys/dev/usb: uatp.c

Log Message:
Use __BIT.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/dev/usb/uatp.c

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

Modified files:

Index: src/sys/dev/usb/uatp.c
diff -u src/sys/dev/usb/uatp.c:1.22 src/sys/dev/usb/uatp.c:1.23
--- src/sys/dev/usb/uatp.c:1.22	Sun Jan 26 22:19:54 2020
+++ src/sys/dev/usb/uatp.c	Sun Jan 26 22:34:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: uatp.c,v 1.22 2020/01/26 22:19:54 riastradh Exp $	*/
+/*	$NetBSD: uatp.c,v 1.23 2020/01/26 22:34:17 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 2011-2014 The NetBSD Foundation, Inc.
@@ -146,7 +146,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.22 2020/01/26 22:19:54 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.23 2020/01/26 22:34:17 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -184,22 +184,22 @@ __KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.2
 	}								\
 } while (0)
 
-#define UATP_DEBUG_ATTACH	(1 << 0)
-#define UATP_DEBUG_MISC		(1 << 1)
-#define UATP_DEBUG_WSMOUSE	(1 << 2)
-#define UATP_DEBUG_IOCTL	(1 << 3)
-#define UATP_DEBUG_RESET	(1 << 4)
-#define UATP_DEBUG_INTR		(1 << 5)
-#define UATP_DEBUG_PARSE	(1 << 6)
-#define UATP_DEBUG_TAP		(1 << 7)
-#define UATP_DEBUG_EMUL_BUTTON	(1 << 8)
-#define UATP_DEBUG_ACCUMULATE	(1 << 9)
-#define UATP_DEBUG_STATUS	(1 << 10)
-#define UATP_DEBUG_SPURINTR	(1 << 11)
-#define UATP_DEBUG_MOVE		(1 << 12)
-#define UATP_DEBUG_ACCEL	(1 << 13)
-#define UATP_DEBUG_TRACK_DIST	(1 << 14)
-#define UATP_DEBUG_PALM		(1 << 15)
+#define UATP_DEBUG_ATTACH	__BIT(0)
+#define UATP_DEBUG_MISC		__BIT(1)
+#define UATP_DEBUG_WSMOUSE	__BIT(2)
+#define UATP_DEBUG_IOCTL	__BIT(3)
+#define UATP_DEBUG_RESET	__BIT(4)
+#define UATP_DEBUG_INTR		__BIT(5)
+#define UATP_DEBUG_PARSE	__BIT(6)
+#define UATP_DEBUG_TAP		__BIT(7)
+#define UATP_DEBUG_EMUL_BUTTON	__BIT(8)
+#define UATP_DEBUG_ACCUMULATE	__BIT(9)
+#define UATP_DEBUG_STATUS	__BIT(10)
+#define UATP_DEBUG_SPURINTR	__BIT(11)
+#define UATP_DEBUG_MOVE		__BIT(12)
+#define UATP_DEBUG_ACCEL	__BIT(13)
+#define UATP_DEBUG_TRACK_DIST	__BIT(14)
+#define UATP_DEBUG_PALM		__BIT(15)
 
 /*
  * Unconditionally enable the debug output so you don't have to
@@ -246,9 +246,9 @@ __KERNEL_RCSID(0, "$NetBSD: uatp.c,v 1.2
 #define UATP_MAX_MOTION_MULTIPLIER	16
 
 /* Status bits transmitted in the last byte of an input packet.  */
-#define UATP_STATUS_BUTTON	(1 << 0)	/* Button pressed */
-#define UATP_STATUS_BASE	(1 << 2)	/* Base sensor data */
-#define UATP_STATUS_POST_RESET	(1 << 4)	/* Post-reset */
+#define UATP_STATUS_BUTTON	__BIT(0)	/* Button pressed */
+#define UATP_STATUS_BASE	__BIT(2)	/* Base sensor data */
+#define UATP_STATUS_POST_RESET	__BIT(4)	/* Post-reset */
 
 /* Forward declarations */
 
@@ -514,9 +514,9 @@ struct uatp_softc {
 	unsigned int sc_track_distance;	/* Distance^2 finger has tracked,
 					 * squared to avoid sqrt in kernel.  */
 	uint32_t sc_status;		/* Status flags:  */
-#define UATP_ENABLED	(1 << 0)	/* . Is the wsmouse enabled?  */
-#define UATP_DYING	(1 << 1)	/* . Have we been deactivated?  */
-#define UATP_VALID	(1 << 2)	/* . Do we have valid sensor data?  */
+#define UATP_ENABLED	__BIT(0)	/* . Is the wsmouse enabled?  */
+#define UATP_DYING	__BIT(1)	/* . Have we been deactivated?  */
+#define UATP_VALID	__BIT(2)	/* . Do we have valid sensor data?  */
 	struct usb_task sc_reset_task;	/* Task for resetting device.  */
 
 	callout_t sc_untap_callout;	/* Releases button after tap.  */

Reply via email to