Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb uhidev(9): Move struct uhidev_softc into uhidev.c.



details:   https://anonhg.NetBSD.org/src/rev/f2e4ee427d15
branches:  trunk
changeset: 364538:f2e4ee427d15
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Mar 28 12:43:22 2022 +0000

description:
uhidev(9): Move struct uhidev_softc into uhidev.c.

No longer part of any ABI for uhidev modules.

diffstat:

 sys/dev/usb/uhidev.c |  44 ++++++++++++++++++++++++++++++++++++++++++--
 sys/dev/usb/uhidev.h |  42 +-----------------------------------------
 2 files changed, 43 insertions(+), 43 deletions(-)

diffs (121 lines):

diff -r 4a3fc3e6a6d5 -r f2e4ee427d15 sys/dev/usb/uhidev.c
--- a/sys/dev/usb/uhidev.c      Mon Mar 28 12:43:12 2022 +0000
+++ b/sys/dev/usb/uhidev.c      Mon Mar 28 12:43:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhidev.c,v 1.84 2022/03/28 12:43:03 riastradh Exp $    */
+/*     $NetBSD: uhidev.c,v 1.85 2022/03/28 12:43:22 riastradh Exp $    */
 
 /*
  * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.84 2022/03/28 12:43:03 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.85 2022/03/28 12:43:22 riastradh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -74,6 +74,46 @@
 
 #include "locators.h"
 
+struct uhidev_softc {
+       device_t sc_dev;                /* base device */
+       struct usbd_device *sc_udev;
+       struct usbd_interface *sc_iface;        /* interface */
+       int sc_iep_addr;
+       int sc_oep_addr;
+       u_int sc_isize;
+
+       int sc_repdesc_size;
+       void *sc_repdesc;
+
+       u_int sc_nrepid;
+       device_t *sc_subdevs;
+
+       kmutex_t sc_lock;
+       kcondvar_t sc_cv;
+
+       /* Read/written under sc_lock.  */
+       struct lwp *sc_writelock;
+       struct lwp *sc_configlock;
+       int sc_refcnt;
+       int sc_writereportid;
+       u_char sc_dying;
+
+       /*
+        * - Read under sc_lock, provided sc_refcnt > 0.
+        * - Written under sc_configlock only when transitioning to and
+        *   from sc_refcnt = 0.
+        */
+       u_char *sc_ibuf;
+       struct usbd_pipe *sc_ipipe;     /* input interrupt pipe */
+       struct usbd_pipe *sc_opipe;     /* output interrupt pipe */
+       struct usbd_xfer *sc_oxfer;     /* write request */
+       usbd_callback sc_writecallback; /* async write request callback */
+       void *sc_writecookie;
+
+       u_int sc_flags;
+#define UHIDEV_F_XB1   0x0001  /* Xbox 1 controller */
+};
+
 #ifdef UHIDEV_DEBUG
 #define DPRINTF(x)     if (uhidevdebug) printf x
 #define DPRINTFN(n,x)  if (uhidevdebug>(n)) printf x
diff -r 4a3fc3e6a6d5 -r f2e4ee427d15 sys/dev/usb/uhidev.h
--- a/sys/dev/usb/uhidev.h      Mon Mar 28 12:43:12 2022 +0000
+++ b/sys/dev/usb/uhidev.h      Mon Mar 28 12:43:22 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uhidev.h,v 1.23 2022/03/28 12:43:03 riastradh Exp $    */
+/*     $NetBSD: uhidev.h,v 1.24 2022/03/28 12:43:22 riastradh Exp $    */
 
 /*
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -35,46 +35,6 @@
 
 #include <sys/rndsource.h>
 
-struct uhidev_softc {
-       device_t sc_dev;                /* base device */
-       struct usbd_device *sc_udev;
-       struct usbd_interface *sc_iface;        /* interface */
-       int sc_iep_addr;
-       int sc_oep_addr;
-       u_int sc_isize;
-
-       int sc_repdesc_size;
-       void *sc_repdesc;
-
-       u_int sc_nrepid;
-       device_t *sc_subdevs;
-
-       kmutex_t sc_lock;
-       kcondvar_t sc_cv;
-
-       /* Read/written under sc_lock.  */
-       struct lwp *sc_writelock;
-       struct lwp *sc_configlock;
-       int sc_refcnt;
-       int sc_writereportid;
-       u_char sc_dying;
-
-       /*
-        * - Read under sc_lock, provided sc_refcnt > 0.
-        * - Written under sc_configlock only when transitioning to and
-        *   from sc_refcnt = 0.
-        */
-       u_char *sc_ibuf;
-       struct usbd_pipe *sc_ipipe;     /* input interrupt pipe */
-       struct usbd_pipe *sc_opipe;     /* output interrupt pipe */
-       struct usbd_xfer *sc_oxfer;     /* write request */
-       usbd_callback sc_writecallback; /* async write request callback */
-       void *sc_writecookie;
-
-       u_int sc_flags;
-#define UHIDEV_F_XB1   0x0001  /* Xbox 1 controller */
-};
-
 struct uhidev {
        device_t sc_dev;                /* base device */
        struct uhidev_softc *sc_parent;



Home | Main Index | Thread Index | Old Index