summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2006-09-18 10:55:52 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2006-09-18 10:55:52 +0000
commit5be0880e78cb230a66c84297a92fdfbffda4ffaa (patch)
tree2ac185a0a5cad06d8e5a2ef98a53d2496126cdb8 /sys/dev/usb
parentdc107a3bdd465dc2da2ddafbee78378e91f4b625 (diff)
get rid of the usb_port.h macros that wrap our kthread create functions.
looks ok pascoe@
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/usb.c23
-rw-r--r--sys/dev/usb/usb_port.h5
2 files changed, 11 insertions, 17 deletions
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index e324f85c8ea..47ce2e4dd3c 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.33 2006/06/23 06:27:12 miod Exp $ */
+/* $OpenBSD: usb.c,v 1.34 2006/09/18 10:55:51 dlg Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -236,7 +236,7 @@ USB_ATTACH(usb)
sc->sc_bus->use_polling--;
config_pending_incr();
- usb_kthread_create(usb_create_event_thread, sc);
+ kthread_create_deferred(usb_create_event_thread, sc);
USB_ATTACH_SUCCESS_RETURN;
}
@@ -251,20 +251,17 @@ usb_create_event_thread(void *arg)
if (sc->sc_bus->usbrev == USBREV_2_0)
threads_pending++;
- if (usb_kthread_create1(usb_event_thread, sc, &sc->sc_event_thread,
- "%s", sc->sc_dev.dv_xname)) {
- printf("%s: unable to create event thread for\n",
- sc->sc_dev.dv_xname);
- panic("usb_create_event_thread");
- }
+ if (kthread_create(usb_event_thread, sc, &sc->sc_event_thread,
+ "%s", sc->sc_dev.dv_xname))
+ panic("unable to create event thread for %s",
+ sc->sc_dev.dv_xname);
+
if (!created) {
created = 1;
TAILQ_INIT(&usb_all_tasks);
- if (usb_kthread_create1(usb_task_thread, NULL,
- &usb_task_thread_proc, "usbtask")) {
- printf("unable to create task thread\n");
- panic("usb_create_event_thread task");
- }
+ if (kthread_create(usb_task_thread, NULL,
+ &usb_task_thread_proc, "usbtask"))
+ panic("unable to create usb task thread");
}
}
diff --git a/sys/dev/usb/usb_port.h b/sys/dev/usb/usb_port.h
index cc4cb7a4c47..13e4dec00fe 100644
--- a/sys/dev/usb/usb_port.h
+++ b/sys/dev/usb/usb_port.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_port.h,v 1.61 2006/04/23 04:48:07 dlg Exp $ */
+/* $OpenBSD: usb_port.h,v 1.62 2006/09/18 10:55:51 dlg Exp $ */
/* $NetBSD: usb_port.h,v 1.62 2003/02/15 18:33:30 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_port.h,v 1.21 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -119,9 +119,6 @@ typedef struct proc *usb_proc_ptr;
#define sel_klist si_note
-#define usb_kthread_create1 kthread_create
-#define usb_kthread_create kthread_create_deferred
-
typedef int usb_malloc_type;
#define Ether_ifattach(ifp, eaddr) ether_ifattach(ifp)