summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorriastradh <riastradh@NetBSD.org>2022-03-28 12:43:22 +0000
committerriastradh <riastradh@NetBSD.org>2022-03-28 12:43:22 +0000
commit4b646e02c9e8d7ea16aa2270a2ba997af1e412cc (patch)
tree16af03864182c4802a3279d50b8e89913c25728e /sys/dev/usb
parent61daad76269fa3106571d4cf4388476ecd520b98 (diff)
uhidev(9): Move struct uhidev_softc into uhidev.c.
No longer part of any ABI for uhidev modules.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/uhidev.c44
-rw-r--r--sys/dev/usb/uhidev.h42
2 files changed, 43 insertions, 43 deletions
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index db7f0fe2604..10b9b17cc5a 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.84 2022/03/28 12:43:03 riastradh Exp $"
#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 --git a/sys/dev/usb/uhidev.h b/sys/dev/usb/uhidev.h
index 862d40a6c91..26d097c1cbe 100644
--- a/sys/dev/usb/uhidev.h
+++ b/sys/dev/usb/uhidev.h
@@ -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;