diff options
| author | jdc <jdc@NetBSD.org> | 2014-01-20 22:02:32 +0000 |
|---|---|---|
| committer | jdc <jdc@NetBSD.org> | 2014-01-20 22:02:32 +0000 |
| commit | 79b65f9954993ca595fed2b9862fa126927872ec (patch) | |
| tree | 322ed3757daf4a7a3b3a6afa25adc0b5f26f81e5 /sys/dev | |
| parent | 8c08e1d06937dfb0fb6c0bf9bcc4d864cf19657e (diff) | |
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 (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ic/pcf8584.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/ic/pcf8584.c b/sys/dev/ic/pcf8584.c index 4fb397bc51f..f61e126c202 100644 --- a/sys/dev/ic/pcf8584.c +++ b/sys/dev/ic/pcf8584.c @@ -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 @@ pcfiic_i2c_exec(void *arg, i2c_op_t op, i2c_addr_t addr, 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)) |
