diff options
author | Bret Lambert <blambert@cvs.openbsd.org> | 2014-07-12 07:20:01 +0000 |
---|---|---|
committer | Bret Lambert <blambert@cvs.openbsd.org> | 2014-07-12 07:20:01 +0000 |
commit | 8894b41a2d55e3893ec035a2a607da02b7c4a464 (patch) | |
tree | 7fd0baf8b7b6107d098f9f022c23c9ea794cbf8f /sys | |
parent | 5578d7704afa00e4a1d545895fdeaa0b954b976a (diff) |
move macppc abtn(4) driver from workq to taskq
thanks to Fred Crowson (fred () crowsons ! net) who was able
to make sure his cd would still eject when the button was pushed,
and stsp@ who lent me his macppc laptop
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/macppc/dev/abtn.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/macppc/dev/abtn.c b/sys/arch/macppc/dev/abtn.c index 01587e9d390..4d774bc1940 100644 --- a/sys/arch/macppc/dev/abtn.c +++ b/sys/arch/macppc/dev/abtn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: abtn.c,v 1.15 2013/11/04 11:57:26 mpi Exp $ */ +/* $OpenBSD: abtn.c,v 1.16 2014/07/12 07:20:00 blambert Exp $ */ /* $NetBSD: abtn.c,v 1.1 1999/07/12 17:48:26 tsubai Exp $ */ /*- @@ -31,7 +31,7 @@ #include <sys/param.h> #include <sys/device.h> #include <sys/systm.h> -#include <sys/workq.h> +#include <sys/task.h> #include <machine/bus.h> @@ -72,6 +72,9 @@ struct cfdriver abtn_cd = { NULL, "abtn", DV_DULL }; +struct task eject_task = + TASK_INITIALIZER((void (*)(void *, void *))cd_eject, NULL, NULL); + int abtn_match(struct device *parent, void *cf, void *aux) { @@ -146,7 +149,7 @@ abtn_adbcomplete(caddr_t buffer, caddr_t data, int adb_command) break; #if NWSKBD > 0 && NCD > 0 case 0x0b: /* eject tray */ - workq_add_task(NULL, 0, (workq_fn)cd_eject, NULL, NULL); + task_add(systq, &eject_task); break; #endif case 0x7f: /* numlock */ |