Module Name:    src
Committed By:   jdc
Date:           Mon Jan 11 18:24:56 UTC 2016

Modified Files:
        src/sys/dev/ic: pcf8584.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/ic/pcf8584.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/ic/pcf8584.c
diff -u src/sys/dev/ic/pcf8584.c:1.14 src/sys/dev/ic/pcf8584.c:1.15
--- src/sys/dev/ic/pcf8584.c:1.14	Mon Jan  4 10:00:33 2016
+++ src/sys/dev/ic/pcf8584.c	Mon Jan 11 18:24:56 2016
@@ -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 @@ pcfiic_i2c_acquire_bus(void *arg, int fl
 {
 	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 @@ pcfiic_i2c_release_bus(void *arg, int fl
 {
 	struct pcfiic_softc	*sc = arg;
 
-	if (cold || sc->sc_poll || (flags & I2C_F_POLL))
-		return;
-
 	rw_exit(&sc->sc_lock);
 }
 

Reply via email to