mxc_spi: bugfix for double incrementing read pointer on unaligned buffers in spi_xchg_single
Subsystems (2)
PATCH 1/1 mxc_spi: bugfix for double incrementing read pointer on unaligned buffers in spi_xchg_single
If dout buffer is not 32 bit-aligned or data to transmit is not multiple of 32 bit the read data pointer is already incremented on single byte reads.
Signed-off-by Timo Herbrecher <[email protected]>
--- drivers/spi/mxc_spi.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/spi/mxc_spi.c +0 -0
@@ -255,8 +255,8 @@ int spi_xchg_single(struct spi_slave *slave,
unsigned int bitlen,
} else {
data = *(u32 *)dout;
data = cpu_to_be32(data);
+ dout += 4;
}
- dout += 4;
}
debug("Sending SPI 0x%x\n", data);
reg_write(®s->txdata, data);Signature · 1 line
1.7.0.4