Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/usb Some more usb_proc_ptr changes.
details: https://anonhg.NetBSD.org/src/rev/4ad8c8a14ca0
branches: trunk
changeset: 520097:4ad8c8a14ca0
user: augustss <augustss%NetBSD.org@localhost>
date: Wed Jan 02 20:55:58 2002 +0000
description:
Some more usb_proc_ptr changes.
Also some minor stylistic changes.
diffstat:
sys/dev/usb/uhid.c | 6 +++---
sys/dev/usb/usb.c | 21 +++++++++++----------
2 files changed, 14 insertions(+), 13 deletions(-)
diffs (110 lines):
diff -r 29b4c38855d0 -r 4ad8c8a14ca0 sys/dev/usb/uhid.c
--- a/sys/dev/usb/uhid.c Wed Jan 02 20:47:37 2002 +0000
+++ b/sys/dev/usb/uhid.c Wed Jan 02 20:55:58 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uhid.c,v 1.48 2001/12/31 12:15:21 augustss Exp $ */
+/* $NetBSD: uhid.c,v 1.49 2002/01/02 20:55:58 augustss Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -42,7 +42,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.48 2001/12/31 12:15:21 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhid.c,v 1.49 2002/01/02 20:55:58 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -109,7 +109,7 @@
Static int uhid_do_read(struct uhid_softc *, struct uio *uio, int);
Static int uhid_do_write(struct uhid_softc *, struct uio *uio, int);
-Static int uhid_do_ioctl(struct uhid_softc*, u_long, caddr_t, int,struct proc*);
+Static int uhid_do_ioctl(struct uhid_softc*, u_long, caddr_t, int, usb_proc_ptr);
USB_DECLARE_DRIVER(uhid);
diff -r 29b4c38855d0 -r 4ad8c8a14ca0 sys/dev/usb/usb.c
--- a/sys/dev/usb/usb.c Wed Jan 02 20:47:37 2002 +0000
+++ b/sys/dev/usb/usb.c Wed Jan 02 20:55:58 2002 +0000
@@ -1,7 +1,7 @@
-/* $NetBSD: usb.c,v 1.61 2001/12/31 15:55:51 augustss Exp $ */
+/* $NetBSD: usb.c,v 1.62 2002/01/02 20:55:58 augustss Exp $ */
/*
- * Copyright (c) 1998 The NetBSD Foundation, Inc.
+ * Copyright (c) 1998, 2002 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
@@ -44,7 +44,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.61 2001/12/31 15:55:51 augustss Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usb.c,v 1.62 2002/01/02 20:55:58 augustss Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -96,7 +96,7 @@
usbd_bus_handle sc_bus; /* USB controller */
struct usbd_port sc_port; /* dummy port for root hub */
- struct proc *sc_event_thread;
+ usb_proc_ptr *sc_event_thread;
char sc_dying;
};
@@ -109,7 +109,7 @@
Static void usb_create_event_thread(void *);
Static void usb_event_thread(void *);
Static void usb_task_thread(void *);
-Static struct proc *usb_task_thread_proc = NULL;
+Static usb_proc_ptr *usb_task_thread_proc = NULL;
#define USB_MAX_EVENTS 100
struct usb_event_q {
@@ -250,7 +250,7 @@
}
/*
- * Add a task to be performed by the event thread. This function can be
+ * Add a task to be performed by the task thread. This function can be
* called from any context and the task will be executed in a process
* context ASAP.
*/
@@ -264,8 +264,9 @@
DPRINTFN(2,("usb_add_task: task=%p\n", task));
TAILQ_INSERT_TAIL(&usb_all_tasks, task, next);
task->onqueue = 1;
- } else
+ } else {
DPRINTFN(3,("usb_add_task: task=%p on q\n", task));
+ }
wakeup(&usb_all_tasks);
splx(s);
}
@@ -703,7 +704,7 @@
case DVACT_DEACTIVATE:
sc->sc_dying = 1;
- if (dev && dev->cdesc && dev->subdevs) {
+ if (dev != NULL && dev->cdesc != NULL && dev->subdevs != NULL) {
for (i = 0; dev->subdevs[i]; i++)
rv |= config_deactivate(dev->subdevs[i]);
}
@@ -723,11 +724,11 @@
sc->sc_dying = 1;
/* Make all devices disconnect. */
- if (sc->sc_port.device)
+ if (sc->sc_port.device != NULL)
usb_disconnect_port(&sc->sc_port, self);
/* Kill off event thread. */
- if (sc->sc_event_thread) {
+ if (sc->sc_event_thread != NULL) {
wakeup(&sc->sc_bus->needs_explore);
if (tsleep(sc, PWAIT, "usbdet", hz * 60))
printf("%s: event thread didn't die\n",
Home |
Main Index |
Thread Index |
Old Index