Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/spi Avoid workqueue_check_duplication().



details:   https://anonhg.NetBSD.org/src/rev/f2f2c40bd427
branches:  trunk
changeset: 962206:f2f2c40bd427
user:      hkenken <hkenken%NetBSD.org@localhost>
date:      Thu Jul 04 11:13:26 2019 +0000

description:
Avoid workqueue_check_duplication().

diffstat:

 sys/dev/spi/oj6sh.c |  13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diffs (42 lines):

diff -r 86ef5b896acd -r f2f2c40bd427 sys/dev/spi/oj6sh.c
--- a/sys/dev/spi/oj6sh.c       Thu Jul 04 09:02:24 2019 +0000
+++ b/sys/dev/spi/oj6sh.c       Thu Jul 04 11:13:26 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: oj6sh.c,v 1.2 2015/12/14 10:31:38 hkenken Exp $        */
+/*     $NetBSD: oj6sh.c,v 1.3 2019/07/04 11:13:26 hkenken Exp $        */
 
 /*
  * Copyright (c) 2014  Genetec Corporation.  All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.2 2015/12/14 10:31:38 hkenken Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oj6sh.c,v 1.3 2019/07/04 11:13:26 hkenken Exp $");
 
 #include "opt_oj6sh.h"
 
@@ -205,13 +205,7 @@
 oj6sh_poll(void *arg)
 {
        struct oj6sh_softc *sc = (struct oj6sh_softc *)arg;
-
        workqueue_enqueue(sc->sc_wq, &sc->sc_wk, NULL);
-
-       if (sc->sc_enabled)
-               callout_reset(&sc->sc_c, POLLRATE, oj6sh_poll, sc);
-
-       return;
 }
 
 static void
@@ -254,6 +248,9 @@
        splx(s);
 out:
        mutex_exit(&sc->sc_lock);
+
+       if (sc->sc_enabled)
+               callout_reset(&sc->sc_c, POLLRATE, oj6sh_poll, sc);
 }
 
 static uint8_t



Home | Main Index | Thread Index | Old Index