[PATCH 2/2] improve-logic-gta02_lis302dl_bitbang.patch
Nelson Castillo
nelsoneci at gmail.com
Wed Nov 19 08:22:56 CET 2008
Make indexing logic easier to understand. Also more efficient.
Reported-by: Werner Almesberger <werner at openmoko.org>
Signed-off-by: Nelson Castillo <nelsoneci at gmail.com>
---
0 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-s3c2440/mach-gta02.c b/arch/arm/mach-s3c2440/mach-gta02.c
index ac2e5b6..313b4a4 100644
--- a/arch/arm/mach-s3c2440/mach-gta02.c
+++ b/arch/arm/mach-s3c2440/mach-gta02.c
@@ -1084,9 +1084,9 @@ static void __gta02_lis302dl_bitbang(struct lis302dl_info *lis, u8 *tx,
/* send the register index, r/w and autoinc bits */
for (n = 0; n < (tx_bytes << 3); n++) {
if (!(n & 7))
- shifter = ~tx[n >> 3];
+ shifter = tx[n >> 3];
s3c2410_gpio_setpin(pdata->pin_clk, 0);
- s3c2410_gpio_setpin(pdata->pin_mosi, !(shifter & 0x80));
+ s3c2410_gpio_setpin(pdata->pin_mosi, !!(shifter & 0x80));
s3c2410_gpio_setpin(pdata->pin_clk, 1);
shifter <<= 1;
}
More information about the openmoko-kernel
mailing list