Module Name: src
Committed By: khorben
Date: Mon May 27 20:23:28 UTC 2013
Modified Files:
src/sys/dev/i2c [khorben-n900]: tps65950.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.3.10.4 -r1.3.10.5 src/sys/dev/i2c/tps65950.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/i2c/tps65950.c
diff -u src/sys/dev/i2c/tps65950.c:1.3.10.4 src/sys/dev/i2c/tps65950.c:1.3.10.5
--- src/sys/dev/i2c/tps65950.c:1.3.10.4 Sun May 12 01:49:44 2013
+++ src/sys/dev/i2c/tps65950.c Mon May 27 20:23:28 2013
@@ -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 <[email protected]>
@@ -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 @@ tps65950_intr_work(struct work *work, vo
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 @@ tps65950_pih_attach(struct tps65950_soft
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 @@ tps65950_gpio_pic_establish_irq(struct p
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 @@ tps65950_kbd_attach(struct tps65950_soft
/* 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;