summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/st_accel_core.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/accel/st_accel_core.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/accel/st_accel_core.c')
-rw-r--r--drivers/iio/accel/st_accel_core.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c
index 630909702a19..0b17004cb12e 100644
--- a/drivers/iio/accel/st_accel_core.c
+++ b/drivers/iio/accel/st_accel_core.c
@@ -13,7 +13,6 @@
#include <linux/acpi.h>
#include <linux/errno.h>
#include <linux/types.h>
-#include <linux/mutex.h>
#include <linux/interrupt.h>
#include <linux/i2c.h>
#include <linux/gpio.h>
@@ -1177,7 +1176,6 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
indio_dev->modes = INDIO_DIRECT_MODE;
indio_dev->info = &accel_info;
- mutex_init(&adata->tb.buf_lock);
err = st_sensors_power_enable(indio_dev);
if (err)
@@ -1188,7 +1186,6 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
goto st_accel_power_off;
adata->num_data_channels = ST_ACCEL_NUMBER_DATA_CHANNELS;
- adata->multiread_bit = adata->sensor_settings->multi_read_bit;
indio_dev->num_channels = ST_SENSORS_NUMBER_ALL_CHANNELS;
channels_size = indio_dev->num_channels * sizeof(struct iio_chan_spec);