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/lm75.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/lm75.c')
| -rw-r--r-- | sys/dev/i2c/lm75.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/i2c/lm75.c b/sys/dev/i2c/lm75.c index ba3b11f8728..3145e1fa11e 100644 --- a/sys/dev/i2c/lm75.c +++ b/sys/dev/i2c/lm75.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lm75.c,v 1.17 2008/04/16 22:44:37 deraadt Exp $ */ +/* $OpenBSD: lm75.c,v 1.18 2008/04/17 19:01:48 deraadt Exp $ */ /* $NetBSD: lm75.c,v 1.1 2003/09/30 00:35:31 thorpej Exp $ */ /* * Copyright (c) 2006 Theo de Raadt <deraadt@openbsd.org> @@ -232,7 +232,7 @@ lmtemp_temp_read(struct lmtemp_softc *sc, uint8_t which, int *valp) return (1); /* convert to half-degrees C */ - *valp = ntohs(data) / (1 << (16 - sc->sc_bits)); + *valp = betoh16(data) / (1 << (16 - sc->sc_bits)); return (0); } |
