Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Remove the check for (cmdlen > 0) when writing. ...
details: https://anonhg.NetBSD.org/src/rev/47b464069fb3
branches: trunk
changeset: 326151:47b464069fb3
user: jdc <jdc%NetBSD.org@localhost>
date: Mon Jan 20 22:02:32 2014 +0000
description:
Remove the check for (cmdlen > 0) when writing. When i2cscan sends a
quick_write, the command length is 0, so we were previously returning
success for every address in this case.
diffstat:
sys/dev/ic/pcf8584.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diffs (21 lines):
diff -r 1b045a43b114 -r 47b464069fb3 sys/dev/ic/pcf8584.c
--- a/sys/dev/ic/pcf8584.c Mon Jan 20 19:03:33 2014 +0000
+++ b/sys/dev/ic/pcf8584.c Mon Jan 20 22:02:32 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcf8584.c,v 1.10 2013/09/15 09:17:28 martin Exp $ */
+/* $NetBSD: pcf8584.c,v 1.11 2014/01/20 22:02:32 jdc Exp $ */
/* $OpenBSD: pcf8584.c,v 1.9 2007/10/20 18:46:21 kettenis Exp $ */
/*
@@ -175,9 +175,8 @@
if (sc->sc_master)
pcfiic_choose_bus(sc, addr >> 7);
- if (cmdlen > 0)
- if (pcfiic_xmit(sc, addr & 0x7f, cmdbuf, cmdlen) != 0)
- return (1);
+ if (pcfiic_xmit(sc, addr & 0x7f, cmdbuf, cmdlen) != 0)
+ return (1);
if (len > 0) {
if (I2C_OP_WRITE_P(op))
Home |
Main Index |
Thread Index |
Old Index