Module Name: src Committed By: thorpej Date: Mon Dec 23 18:09:06 UTC 2019
Modified Files: src/sys/dev/i2c: cx24227.c Log Message: No need to use I2C_F_POLL here. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/i2c/cx24227.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/i2c/cx24227.c diff -u src/sys/dev/i2c/cx24227.c:1.9 src/sys/dev/i2c/cx24227.c:1.10 --- src/sys/dev/i2c/cx24227.c:1.9 Mon Dec 23 18:03:14 2019 +++ src/sys/dev/i2c/cx24227.c Mon Dec 23 18:09:05 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cx24227.c,v 1.9 2019/12/23 18:03:14 thorpej Exp $ */ +/* $NetBSD: cx24227.c,v 1.10 2019/12/23 18:09:05 thorpej Exp $ */ /* * Copyright (c) 2008, 2011 Jonathan A. Kollasch @@ -27,7 +27,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.9 2019/12/23 18:03:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cx24227.c,v 1.10 2019/12/23 18:09:05 thorpej Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -108,16 +108,16 @@ cx24227_writereg(struct cx24227 *sc, uin int error; uint8_t r[3]; - if ((error = iic_acquire_bus(sc->tag, I2C_F_POLL) != 0)) + if ((error = iic_acquire_bus(sc->tag, 0) != 0)) return error; r[0] = reg; r[1] = (data >> 8) & 0xff; r[2] = data & 0xff; error = iic_exec(sc->tag, I2C_OP_WRITE_WITH_STOP, sc->addr, - r, 3, NULL, 0, I2C_F_POLL); + r, 3, NULL, 0, 0); - iic_release_bus(sc->tag, I2C_F_POLL); + iic_release_bus(sc->tag, 0); return error; } @@ -130,13 +130,13 @@ cx24227_readreg(struct cx24227 *sc, uint *data = 0x0000; - if ((error = iic_acquire_bus(sc->tag, I2C_F_POLL) != 0)) + if ((error = iic_acquire_bus(sc->tag, 0) != 0)) return error; error = iic_exec(sc->tag, I2C_OP_READ_WITH_STOP, sc->addr, - ®, 1, r, 2, I2C_F_POLL); + ®, 1, r, 2, 0); - iic_release_bus(sc->tag, I2C_F_POLL); + iic_release_bus(sc->tag, 0); *data |= r[0] << 8; *data |= r[1];