diff options
| author | 2008-04-17 19:01:48 +0000 | |
|---|---|---|
| committer | 2008-04-17 19:01:48 +0000 | |
| commit | 91eacc75c9904a072e8b7c3428f766321fd5fb57 (patch) | |
| tree | 55ab09b9332dce463634e456f696c3177475a2e0 /sys/dev/i2c/spdmem.c | |
| parent | do not blindly call ieee80211_get_hdrlen() in rt2860_rx_intr(). (diff) | |
| download | wireguard-openbsd-91eacc75c9904a072e8b7c3428f766321fd5fb57.tar.xz wireguard-openbsd-91eacc75c9904a072e8b7c3428f766321fd5fb57.zip | |
make it more apparent that when we are dealing with 16 bit registers
(not a series of 8 bit registers), the bytes come off the wire in
big-endian order
Diffstat (limited to 'sys/dev/i2c/spdmem.c')
| -rw-r--r-- | sys/dev/i2c/spdmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/dev/i2c/spdmem.c b/sys/dev/i2c/spdmem.c index 19197afb0d2..3a02f6386e3 100644 --- a/sys/dev/i2c/spdmem.c +++ b/sys/dev/i2c/spdmem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spdmem.c,v 1.23 2007/11/26 17:40:56 jsg Exp $ */ +/* $OpenBSD: spdmem.c,v 1.24 2008/04/17 19:01:48 deraadt Exp $ */ /* $NetBSD: spdmem.c,v 1.3 2007/09/20 23:09:59 xtraeme Exp $ */ /* @@ -580,8 +580,8 @@ spdmem_read(struct spdmem_softc *sc, uint8_t reg) uint8_t val; iic_acquire_bus(sc->sc_tag,0); - iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, ®, 1, - &val, 1, 0); + iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr, + ®, sizeof reg, &val, sizeof val, 0); iic_release_bus(sc->sc_tag, 0); return val; |
