Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/nvidia Adjust data pointer using current, rathe...
details: https://anonhg.NetBSD.org/src/rev/f0a56c7a4357
branches: trunk
changeset: 346971:f0a56c7a4357
user: jakllsch <jakllsch%NetBSD.org@localhost>
date: Mon Aug 08 14:36:56 2016 +0000
description:
Adjust data pointer using current, rather than upcoming, transfer length.
diffstat:
sys/arch/arm/nvidia/tegra_i2c.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r ff009f1076cc -r f0a56c7a4357 sys/arch/arm/nvidia/tegra_i2c.c
--- a/sys/arch/arm/nvidia/tegra_i2c.c Mon Aug 08 14:34:02 2016 +0000
+++ b/sys/arch/arm/nvidia/tegra_i2c.c Mon Aug 08 14:36:56 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_i2c.c,v 1.13 2016/02/14 19:54:20 chs Exp $ */
+/* $NetBSD: tegra_i2c.c,v 1.14 2016/08/08 14:36:56 jakllsch Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.13 2016/02/14 19:54:20 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_i2c.c,v 1.14 2016/08/08 14:36:56 jakllsch Exp $");
#include <sys/param.h>
#include <sys/bus.h>
@@ -432,8 +432,8 @@
data |= (uint32_t)p[n] << (n * 8);
}
I2C_WRITE(sc, I2C_TX_PACKET_FIFO_REG, data);
+ p += min(resid, 4);
resid -= min(resid, 4);
- p += min(resid, 4);
}
return tegra_i2c_wait(sc, flags);
@@ -488,8 +488,8 @@
for (n = 0; n < min(resid, 4); n++) {
p[n] = (data >> (n * 8)) & 0xff;
}
+ p += min(resid, 4);
resid -= min(resid, 4);
- p += min(resid, 4);
}
return tegra_i2c_wait(sc, flags);
Home |
Main Index |
Thread Index |
Old Index