[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20161209103733.31226-1-marcus.folkesson@gmail.com>
Date: Fri, 9 Dec 2016 11:37:33 +0100
From: Marcus Folkesson <marcus.folkesson@...il.com>
To: Eric Piel <eric.piel@...mplin-utc.net>
Cc: linux-kernel@...r.kernel.org,
Marcus Folkesson <marcus.folkesson@...il.com>
Subject: [PATCH] misc: lis3lv02d: use spi_write_then_read() instead of spi_write()
spi_write() needs a DMA-safe buffer.
Signed-off-by: Marcus Folkesson <marcus.folkesson@...il.com>
---
drivers/misc/lis3lv02d/lis3lv02d_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/misc/lis3lv02d/lis3lv02d_spi.c b/drivers/misc/lis3lv02d/lis3lv02d_spi.c
index e575475123c8..7e592df6f0d2 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d_spi.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d_spi.c
@@ -40,7 +40,7 @@ static int lis3_spi_write(struct lis3lv02d *lis3, int reg, u8 val)
{
u8 tmp[2] = { reg, val };
struct spi_device *spi = lis3->bus_priv;
- return spi_write(spi, tmp, sizeof(tmp));
+ return spi_write_then_read(spi, tmp, sizeof(tmp), NULL, 0);
}
static int lis3_spi_init(struct lis3lv02d *lis3)
--
2.11.0.rc2
Powered by blists - more mailing lists