diff options
author | Denis Ciocca <denis.ciocca@st.com> | 2019-07-19 01:53:53 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-07-28 00:52:06 +0300 |
commit | 062809ef7733209312562e87cefc84a470430929 (patch) | |
tree | d8ba6b9866b49d2b445ab56bcfc5607f7a2eb97a /drivers/iio/gyro/st_gyro_buffer.c | |
parent | 1ecd245e0eb23d1c3803474eba75589743d0d1fe (diff) | |
download | linux-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/gyro/st_gyro_buffer.c')
-rw-r--r-- | drivers/iio/gyro/st_gyro_buffer.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/gyro/st_gyro_buffer.c b/drivers/iio/gyro/st_gyro_buffer.c index 6e362f735e92..21360681d4dd 100644 --- a/drivers/iio/gyro/st_gyro_buffer.c +++ b/drivers/iio/gyro/st_gyro_buffer.c @@ -39,7 +39,8 @@ static int st_gyro_buffer_postenable(struct iio_dev *indio_dev) int err; struct st_sensor_data *gdata = iio_priv(indio_dev); - gdata->buffer_data = kmalloc(indio_dev->scan_bytes, GFP_KERNEL); + gdata->buffer_data = kmalloc(indio_dev->scan_bytes, + GFP_DMA | GFP_KERNEL); if (gdata->buffer_data == NULL) { err = -ENOMEM; goto allocate_memory_error; |