diff options
| author | joerg <joerg@NetBSD.org> | 2014-08-04 23:28:19 +0000 |
|---|---|---|
| committer | joerg <joerg@NetBSD.org> | 2014-08-04 23:28:19 +0000 |
| commit | 282eb43b350da2a9f8ce88e9d2cd4e4757a6d986 (patch) | |
| tree | 93f72e64f90e705b3c751bbbe6aa16844b38e5b9 /sys/dev/i2c | |
| parent | 058a1a32b92c39394295a7a7a613d4b21fa14f19 (diff) | |
Assume bitops are meant here.
Diffstat (limited to 'sys/dev/i2c')
| -rw-r--r-- | sys/dev/i2c/x1226.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/dev/i2c/x1226.c b/sys/dev/i2c/x1226.c index a5086c7d196..f83d85d8836 100644 --- a/sys/dev/i2c/x1226.c +++ b/sys/dev/i2c/x1226.c @@ -1,4 +1,4 @@ -/* $NetBSD: x1226.c,v 1.17 2014/07/25 08:10:37 dholland Exp $ */ +/* $NetBSD: x1226.c,v 1.18 2014/08/04 23:28:19 joerg Exp $ */ /* * Copyright (c) 2003 Shigeyuki Fukushima. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.17 2014/07/25 08:10:37 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: x1226.c,v 1.18 2014/08/04 23:28:19 joerg Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -182,8 +182,8 @@ xrtc_read(dev_t dev, struct uio *uio, int flags) while (uio->uio_resid && uio->uio_offset < X1226_NVRAM_SIZE) { addr = (int)uio->uio_offset + X1226_NVRAM_START; - cmdbuf[0] = (addr >> 8) && 0xff; - cmdbuf[1] = addr && 0xff; + cmdbuf[0] = (addr >> 8) & 0xff; + cmdbuf[1] = addr & 0xff; if ((error = iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_address, cmdbuf, 2, &ch, 1, 0)) != 0) { @@ -223,8 +223,8 @@ xrtc_write(dev_t dev, struct uio *uio, int flags) while (uio->uio_resid && uio->uio_offset < X1226_NVRAM_SIZE) { addr = (int)uio->uio_offset + X1226_NVRAM_START; - cmdbuf[0] = (addr >> 8) && 0xff; - cmdbuf[1] = addr && 0xff; + cmdbuf[0] = (addr >> 8) & 0xff; + cmdbuf[1] = addr & 0xff; if ((error = uiomove(&cmdbuf[2], 1, uio)) != 0) { break; } |
