Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Use __BIT.



details:   https://anonhg.NetBSD.org/src/rev/d2c2604628bb
branches:  trunk
changeset: 744188:d2c2604628bb
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Jan 26 22:34:17 2020 +0000

description:
Use __BIT.

diffstat:

 sys/dev/usb/uatp.c |  48 ++++++++++++++++++++++++------------------------
 1 files changed, 24 insertions(+), 24 deletions(-)

diffs (83 lines):

diff -r e6adcc036f4e -r d2c2604628bb sys/dev/usb/uatp.c
--- a/sys/dev/usb/uatp.c        Sun Jan 26 22:19:54 2020 +0000
+++ b/sys/dev/usb/uatp.c        Sun Jan 26 22:34:17 2020 +0000
@@ -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 @@
        }                                                               \
 } 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 @@
 #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 @@
        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.  */



Home | Main Index | Thread Index | Old Index