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/pressure/st_pressure_i2c.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/pressure/st_pressure_i2c.c')
-rw-r--r-- | drivers/iio/pressure/st_pressure_i2c.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/iio/pressure/st_pressure_i2c.c b/drivers/iio/pressure/st_pressure_i2c.c index 466e7dde5eae..71d2ed6b4948 100644 --- a/drivers/iio/pressure/st_pressure_i2c.c +++ b/drivers/iio/pressure/st_pressure_i2c.c @@ -112,7 +112,9 @@ static int st_press_i2c_probe(struct i2c_client *client, press_data = iio_priv(indio_dev); press_data->sensor_settings = (struct st_sensor_settings *)settings; - st_sensors_i2c_configure(indio_dev, client, press_data); + ret = st_sensors_i2c_configure(indio_dev, client); + if (ret < 0) + return ret; ret = st_press_common_probe(indio_dev); if (ret < 0) |