Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Always take the bus lock (avoids collisions when ...



details:   https://anonhg.NetBSD.org/src/rev/a9eea17834e8
branches:  trunk
changeset: 342865:a9eea17834e8
user:      jdc <jdc%NetBSD.org@localhost>
date:      Mon Jan 11 18:24:56 2016 +0000

description:
Always take the bus lock (avoids collisions when drivers set I2C_F_POLL).

diffstat:

 sys/dev/ic/pcf8584.c |  8 +-------
 1 files changed, 1 insertions(+), 7 deletions(-)

diffs (29 lines):

diff -r 258c3e05c898 -r a9eea17834e8 sys/dev/ic/pcf8584.c
--- a/sys/dev/ic/pcf8584.c      Mon Jan 11 18:23:52 2016 +0000
+++ b/sys/dev/ic/pcf8584.c      Mon Jan 11 18:24:56 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcf8584.c,v 1.14 2016/01/04 10:00:33 jdc Exp $ */
+/*     $NetBSD: pcf8584.c,v 1.15 2016/01/11 18:24:56 jdc Exp $ */
 /*     $OpenBSD: pcf8584.c,v 1.9 2007/10/20 18:46:21 kettenis Exp $ */
 
 /*
@@ -116,9 +116,6 @@
 {
        struct pcfiic_softc     *sc = arg;
 
-       if (cold || sc->sc_poll || (flags & I2C_F_POLL))
-               return (0);
-
        rw_enter(&sc->sc_lock, RW_WRITER);
        return 0;
 }
@@ -128,9 +125,6 @@
 {
        struct pcfiic_softc     *sc = arg;
 
-       if (cold || sc->sc_poll || (flags & I2C_F_POLL))
-               return;
-
        rw_exit(&sc->sc_lock);
 }
 



Home | Main Index | Thread Index | Old Index