* [PATCH] misc: lis3lv02d: use spi_write_then_read() instead of spi_write()
@ 2016-12-09 10:37 Marcus Folkesson
0 siblings, 0 replies; only message in thread
From: Marcus Folkesson @ 2016-12-09 10:37 UTC (permalink / raw)
To: Eric Piel; +Cc: linux-kernel, Marcus Folkesson
spi_write() needs a DMA-safe buffer.
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-12-09 10:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-09 10:37 [PATCH] misc: lis3lv02d: use spi_write_then_read() instead of spi_write() Marcus Folkesson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox