Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/khorben-n900]: src/sys/dev/i2c Fixed use of workqueue_create(9), as it e...
details: https://anonhg.NetBSD.org/src/rev/230815eaa0ca
branches: khorben-n900
changeset: 786717:230815eaa0ca
user: khorben <khorben%NetBSD.org@localhost>
date: Mon May 27 20:23:28 2013 +0000
description:
Fixed use of workqueue_create(9), as it expects a pri_t as the priority.
The IPL level was changed to IPL_SOFTBIO which seems more correct.
Thanks jmcneill@ for the hint.
XXX test on the Nokia N900
diffstat:
sys/dev/i2c/tps65950.c | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
diffs (58 lines):
diff -r 5958ef758383 -r 230815eaa0ca sys/dev/i2c/tps65950.c
--- a/sys/dev/i2c/tps65950.c Thu May 16 21:41:15 2013 +0000
+++ b/sys/dev/i2c/tps65950.c Mon May 27 20:23:28 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tps65950.c,v 1.3.10.4 2013/05/12 01:49:44 khorben Exp $ */
+/* $NetBSD: tps65950.c,v 1.3.10.5 2013/05/27 20:23:28 khorben Exp $ */
/*-
* Copyright (c) 2012 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tps65950.c,v 1.3.10.4 2013/05/12 01:49:44 khorben Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tps65950.c,v 1.3.10.5 2013/05/27 20:23:28 khorben Exp $");
#define _INTR_PRIVATE
@@ -503,11 +503,12 @@
static void
tps65950_pih_attach(struct tps65950_softc *sc, int intr)
{
+ const int wqflags = WQ_MPSAFE;
int error;
/* create the workqueues */
error = workqueue_create(&sc->sc_workq, device_xname(sc->sc_dev),
- tps65950_intr_work, sc, PRIO_MAX, IPL_VM, 0);
+ tps65950_intr_work, sc, PRI_BIO, IPL_SOFTBIO, wqflags);
if (error) {
aprint_error_dev(sc->sc_dev, "couldn't create workqueue\n");
return;
@@ -516,7 +517,7 @@
error = workqueue_create(&tps65950_pih_workqueue,
device_xname(sc->sc_dev), tps65950_pih_intr_work, sc,
- PRIO_MAX, IPL_HIGH, 0);
+ PRI_IDLE, IPL_SOFTBIO, wqflags);
if (error) {
aprint_error_dev(sc->sc_dev, "couldn't create workqueue\n");
return;
@@ -818,6 +819,7 @@
static void
tps65950_kbd_attach(struct tps65950_softc *sc)
{
+ const int wqflags = WQ_MPSAFE;
uint8_t u8;
struct wskbddev_attach_args a;
int error;
@@ -851,7 +853,7 @@
/* create the workqueue */
error = workqueue_create(&tps65950_kbd_workqueue,
device_xname(sc->sc_dev), tps65950_kbd_intr_work, sc,
- PRIO_MAX, IPL_VM, 0);
+ PRI_BIO, IPL_SOFTBIO, wqflags);
if (error) {
aprint_error_dev(sc->sc_dev, "couldn't create workqueue\n");
return;
Home |
Main Index |
Thread Index |
Old Index