diff options
author | Lorenzo Bianconi <lorenzo.bianconi83@gmail.com> | 2017-06-20 21:52:08 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2017-07-01 11:16:56 +0200 |
commit | 250bbbdbed93ca27c9f4d445c960a87d9f7e2044 (patch) | |
tree | 99eb94ced6fda52ccd6b0089376ea74e69eccf48 /drivers/iio/magnetometer | |
parent | iio: magnetometer: st_magn_core: enable multiread by default for LIS3MDL (diff) | |
download | linux-250bbbdbed93ca27c9f4d445c960a87d9f7e2044.tar.xz linux-250bbbdbed93ca27c9f4d445c960a87d9f7e2044.zip |
iio: common: st_sensors: move st_sensors_of_i2c_probe() in common code
Move st_sensors_of_i2c_probe() in st_sensors_core and rename it in
st_sensors_of_name_probe(). That change is necessary to add device-tree
support in spi code otherwise the rest of the autodetection will fail
since spi->modalias (and indio_dev->name) will be set using compatible
string value that differs from standard sensor name
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r-- | drivers/iio/magnetometer/st_magn_i2c.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c index 8aa37af306ed..6a6c8121ac2c 100644 --- a/drivers/iio/magnetometer/st_magn_i2c.c +++ b/drivers/iio/magnetometer/st_magn_i2c.c @@ -59,7 +59,8 @@ static int st_magn_i2c_probe(struct i2c_client *client, return -ENOMEM; mdata = iio_priv(indio_dev); - st_sensors_of_i2c_probe(client, st_magn_of_match); + st_sensors_of_name_probe(&client->dev, st_magn_of_match, + client->name, sizeof(client->name)); st_sensors_i2c_configure(indio_dev, client, mdata); |