From 80a45b38d4288005c113217084fe2013700780cd Mon Sep 17 00:00:00 2001 From: Martin Pieuchot Date: Mon, 4 Nov 2013 11:57:27 +0000 Subject: Convert wskbd_set_mixervolume() to use a task internally instead of being called in a workq. ok kettenis@ --- sys/dev/wscons/wskbd.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'sys/dev/wscons') diff --git a/sys/dev/wscons/wskbd.c b/sys/dev/wscons/wskbd.c index 0cc9e91d46d..d9cca40c364 100644 --- a/sys/dev/wscons/wskbd.c +++ b/sys/dev/wscons/wskbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: wskbd.c,v 1.74 2013/10/18 22:06:42 miod Exp $ */ +/* $OpenBSD: wskbd.c,v 1.75 2013/11/04 11:57:26 mpi Exp $ */ /* $NetBSD: wskbd.c,v 1.80 2005/05/04 01:52:16 augustss Exp $ */ /* @@ -95,7 +95,6 @@ #include #include #include -#include #include @@ -298,7 +297,7 @@ static struct wskbd_internal wskbd_console_data; void wskbd_update_layout(struct wskbd_internal *, kbd_t); #if NAUDIO > 0 -extern int wskbd_set_mixervolume(long dir, int out); +extern int wskbd_set_mixervolume(long, long); #endif void @@ -1644,16 +1643,13 @@ wskbd_translate(struct wskbd_internal *id, u_int type, int value) switch (ksym) { #if NAUDIO > 0 case KS_AudioMute: - workq_add_task(NULL, 0, (workq_fn)wskbd_set_mixervolume, - (void *)(long)0, (void *)(int)1); + wskbd_set_mixervolume(0, 1); return (0); case KS_AudioLower: - workq_add_task(NULL, 0, (workq_fn)wskbd_set_mixervolume, - (void *)(long)-1, (void*)(int)1); + wskbd_set_mixervolume(-1, 1); return (0); case KS_AudioRaise: - workq_add_task(NULL, 0, (workq_fn)wskbd_set_mixervolume, - (void *)(long)1, (void*)(int)1); + wskbd_set_mixervolume(1, 1); return (0); #endif default: -- cgit v1.2.3