[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20161209102435.30638-1-marcus.folkesson@gmail.com>
Date: Fri, 9 Dec 2016 11:24:35 +0100
From: Marcus Folkesson <marcus.folkesson@...il.com>
To: Jonathan Cameron <jic23@...nel.org>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
Matt Ranostay <mranostay@...il.com>,
Sandhya Bankar <bankarsandhya512@...il.com>
Cc: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Marcus Folkesson <marcus.folkesson@...il.com>
Subject: [PATCH] iio: adc: max1027: allocate DMA-safe buffer
The buffer needs to be DMA-safe when used with spi_read()
Signed-off-by: Marcus Folkesson <marcus.folkesson@...il.com>
---
drivers/iio/adc/max1027.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
index 712fbd2b1f16..ff1f1f15a873 100644
--- a/drivers/iio/adc/max1027.c
+++ b/drivers/iio/adc/max1027.c
@@ -435,7 +435,7 @@ static int max1027_probe(struct spi_device *spi)
st->buffer = devm_kmalloc(&indio_dev->dev,
indio_dev->num_channels * 2,
- GFP_KERNEL);
+ GFP_KERNEL | GFP_DMA);
if (st->buffer == NULL) {
dev_err(&indio_dev->dev, "Can't allocate buffer\n");
return -ENOMEM;
--
2.11.0.rc2
Powered by blists - more mailing lists