diff options
author | Denis CIOCCA <denis.ciocca@st.com> | 2014-10-03 19:35:41 +0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-10-04 14:26:21 +0400 |
commit | 7be178bb48bc3ed5af2f6cfdb69074dba4bd87b9 (patch) | |
tree | d496c59b2d909757276601a35c722b830f81e955 | |
parent | a1dcf42927a3eebe749b14178441889ef3887ceb (diff) | |
download | linux-7be178bb48bc3ed5af2f6cfdb69074dba4bd87b9.tar.xz |
iio:common: Set the device pointer into ST common sensors library
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/accel/st_accel_i2c.c | 1 | ||||
-rw-r--r-- | drivers/iio/accel/st_accel_spi.c | 1 | ||||
-rw-r--r-- | drivers/iio/common/st_sensors/st_sensors_i2c.c | 1 | ||||
-rw-r--r-- | drivers/iio/common/st_sensors/st_sensors_spi.c | 1 | ||||
-rw-r--r-- | drivers/iio/gyro/st_gyro_i2c.c | 1 | ||||
-rw-r--r-- | drivers/iio/gyro/st_gyro_spi.c | 1 | ||||
-rw-r--r-- | drivers/iio/magnetometer/st_magn_i2c.c | 1 | ||||
-rw-r--r-- | drivers/iio/magnetometer/st_magn_spi.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_i2c.c | 1 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_spi.c | 1 |
10 files changed, 2 insertions, 8 deletions
diff --git a/drivers/iio/accel/st_accel_i2c.c b/drivers/iio/accel/st_accel_i2c.c index 40adc7e88a39..c7246bdd30b9 100644 --- a/drivers/iio/accel/st_accel_i2c.c +++ b/drivers/iio/accel/st_accel_i2c.c @@ -79,7 +79,6 @@ static int st_accel_i2c_probe(struct i2c_client *client, return -ENOMEM; adata = iio_priv(indio_dev); - adata->dev = &client->dev; st_sensors_of_i2c_probe(client, st_accel_of_match); st_sensors_i2c_configure(indio_dev, client, adata); diff --git a/drivers/iio/accel/st_accel_spi.c b/drivers/iio/accel/st_accel_spi.c index 2090d80062d2..12ec29389e4b 100644 --- a/drivers/iio/accel/st_accel_spi.c +++ b/drivers/iio/accel/st_accel_spi.c @@ -29,7 +29,6 @@ static int st_accel_spi_probe(struct spi_device *spi) return -ENOMEM; adata = iio_priv(indio_dev); - adata->dev = &spi->dev; st_sensors_spi_configure(indio_dev, spi, adata); diff --git a/drivers/iio/common/st_sensors/st_sensors_i2c.c b/drivers/iio/common/st_sensors/st_sensors_i2c.c index bb6f3085f57b..98cfee296d46 100644 --- a/drivers/iio/common/st_sensors/st_sensors_i2c.c +++ b/drivers/iio/common/st_sensors/st_sensors_i2c.c @@ -72,6 +72,7 @@ void st_sensors_i2c_configure(struct iio_dev *indio_dev, indio_dev->dev.parent = &client->dev; indio_dev->name = client->name; + sdata->dev = &client->dev; sdata->tf = &st_sensors_tf_i2c; sdata->get_irq_data_ready = st_sensors_i2c_get_irq; } diff --git a/drivers/iio/common/st_sensors/st_sensors_spi.c b/drivers/iio/common/st_sensors/st_sensors_spi.c index 251baf6abc25..78a6a1ab3ece 100644 --- a/drivers/iio/common/st_sensors/st_sensors_spi.c +++ b/drivers/iio/common/st_sensors/st_sensors_spi.c @@ -111,6 +111,7 @@ void st_sensors_spi_configure(struct iio_dev *indio_dev, indio_dev->dev.parent = &spi->dev; indio_dev->name = spi->modalias; + sdata->dev = &spi->dev; sdata->tf = &st_sensors_tf_spi; sdata->get_irq_data_ready = st_sensors_spi_get_irq; } diff --git a/drivers/iio/gyro/st_gyro_i2c.c b/drivers/iio/gyro/st_gyro_i2c.c index 94d01fba4a4c..64480b16c689 100644 --- a/drivers/iio/gyro/st_gyro_i2c.c +++ b/drivers/iio/gyro/st_gyro_i2c.c @@ -67,7 +67,6 @@ static int st_gyro_i2c_probe(struct i2c_client *client, return -ENOMEM; gdata = iio_priv(indio_dev); - gdata->dev = &client->dev; st_sensors_of_i2c_probe(client, st_gyro_of_match); st_sensors_i2c_configure(indio_dev, client, gdata); diff --git a/drivers/iio/gyro/st_gyro_spi.c b/drivers/iio/gyro/st_gyro_spi.c index 3e7a01af9b61..e59bead6bc3c 100644 --- a/drivers/iio/gyro/st_gyro_spi.c +++ b/drivers/iio/gyro/st_gyro_spi.c @@ -29,7 +29,6 @@ static int st_gyro_spi_probe(struct spi_device *spi) return -ENOMEM; gdata = iio_priv(indio_dev); - gdata->dev = &spi->dev; st_sensors_spi_configure(indio_dev, spi, gdata); diff --git a/drivers/iio/magnetometer/st_magn_i2c.c b/drivers/iio/magnetometer/st_magn_i2c.c index f8a682374239..92e5c15452a3 100644 --- a/drivers/iio/magnetometer/st_magn_i2c.c +++ b/drivers/iio/magnetometer/st_magn_i2c.c @@ -51,7 +51,6 @@ static int st_magn_i2c_probe(struct i2c_client *client, return -ENOMEM; mdata = iio_priv(indio_dev); - mdata->dev = &client->dev; st_sensors_of_i2c_probe(client, st_magn_of_match); st_sensors_i2c_configure(indio_dev, client, mdata); diff --git a/drivers/iio/magnetometer/st_magn_spi.c b/drivers/iio/magnetometer/st_magn_spi.c index f64214237cf6..7adacf160146 100644 --- a/drivers/iio/magnetometer/st_magn_spi.c +++ b/drivers/iio/magnetometer/st_magn_spi.c @@ -29,7 +29,6 @@ static int st_magn_spi_probe(struct spi_device *spi) return -ENOMEM; mdata = iio_priv(indio_dev); - mdata->dev = &spi->dev; st_sensors_spi_configure(indio_dev, spi, mdata); diff --git a/drivers/iio/pressure/st_pressure_i2c.c b/drivers/iio/pressure/st_pressure_i2c.c index 8859e93e6dc6..137788bba4a3 100644 --- a/drivers/iio/pressure/st_pressure_i2c.c +++ b/drivers/iio/pressure/st_pressure_i2c.c @@ -51,7 +51,6 @@ static int st_press_i2c_probe(struct i2c_client *client, return -ENOMEM; press_data = iio_priv(indio_dev); - press_data->dev = &client->dev; st_sensors_of_i2c_probe(client, st_press_of_match); st_sensors_i2c_configure(indio_dev, client, press_data); diff --git a/drivers/iio/pressure/st_pressure_spi.c b/drivers/iio/pressure/st_pressure_spi.c index 10c96245f12a..1ffa6d4d349c 100644 --- a/drivers/iio/pressure/st_pressure_spi.c +++ b/drivers/iio/pressure/st_pressure_spi.c @@ -29,7 +29,6 @@ static int st_press_spi_probe(struct spi_device *spi) return -ENOMEM; press_data = iio_priv(indio_dev); - press_data->dev = &spi->dev; st_sensors_spi_configure(indio_dev, spi, press_data); |