summaryrefslogtreecommitdiff
path: root/drivers/iio/pressure/st_pressure_buffer.c
diff options
context:
space:
mode:
authorDenis Ciocca <denis.ciocca@st.com>2019-07-19 01:53:53 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-07-28 00:52:06 +0300
commit062809ef7733209312562e87cefc84a470430929 (patch)
treed8ba6b9866b49d2b445ab56bcfc5607f7a2eb97a /drivers/iio/pressure/st_pressure_buffer.c
parent1ecd245e0eb23d1c3803474eba75589743d0d1fe (diff)
downloadlinux-062809ef7733209312562e87cefc84a470430929.tar.xz
iio: make st_sensors drivers use regmap
This patch is meant to replace the i2c/spi transfer functions with regmap. SPI framework requires DMA safe buffers so let's add GFP_DMA flag for memory allocation used by bulk_read functions. Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/pressure/st_pressure_buffer.c')
-rw-r--r--drivers/iio/pressure/st_pressure_buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/pressure/st_pressure_buffer.c b/drivers/iio/pressure/st_pressure_buffer.c
index 4566e08a64a1..f21b630abaa0 100644
--- a/drivers/iio/pressure/st_pressure_buffer.c
+++ b/drivers/iio/pressure/st_pressure_buffer.c
@@ -39,7 +39,8 @@ static int st_press_buffer_postenable(struct iio_dev *indio_dev)
int err;
struct st_sensor_data *press_data = iio_priv(indio_dev);
- press_data->buffer_data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL);
+ press_data->buffer_data = kmalloc(indio_dev->scan_bytes,
+ GFP_DMA | GFP_KERNEL);
if (press_data->buffer_data == NULL) {
err = -ENOMEM;
goto allocate_memory_error;