diff options
author | Denis CIOCCA <denis.ciocca@st.com> | 2014-10-03 11:35:41 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-10-04 06:26:21 -0400 |
commit | 7be178bb48bc3ed5af2f6cfdb69074dba4bd87b9 (patch) | |
tree | d496c59b2d909757276601a35c722b830f81e955 /drivers | |
parent | a1dcf42927a3eebe749b14178441889ef3887ceb (diff) |
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>
Diffstat (limited to 'drivers')
-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, | |||
79 | return -ENOMEM; | 79 | return -ENOMEM; |
80 | 80 | ||
81 | adata = iio_priv(indio_dev); | 81 | adata = iio_priv(indio_dev); |
82 | adata->dev = &client->dev; | ||
83 | st_sensors_of_i2c_probe(client, st_accel_of_match); | 82 | st_sensors_of_i2c_probe(client, st_accel_of_match); |
84 | 83 | ||
85 | st_sensors_i2c_configure(indio_dev, client, adata); | 84 | 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) | |||
29 | return -ENOMEM; | 29 | return -ENOMEM; |
30 | 30 | ||
31 | adata = iio_priv(indio_dev); | 31 | adata = iio_priv(indio_dev); |
32 | adata->dev = &spi->dev; | ||
33 | 32 | ||
34 | st_sensors_spi_configure(indio_dev, spi, adata); | 33 | st_sensors_spi_configure(indio_dev, spi, adata); |
35 | 34 | ||
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, | |||
72 | indio_dev->dev.parent = &client->dev; | 72 | indio_dev->dev.parent = &client->dev; |
73 | indio_dev->name = client->name; | 73 | indio_dev->name = client->name; |
74 | 74 | ||
75 | sdata->dev = &client->dev; | ||
75 | sdata->tf = &st_sensors_tf_i2c; | 76 | sdata->tf = &st_sensors_tf_i2c; |
76 | sdata->get_irq_data_ready = st_sensors_i2c_get_irq; | 77 | sdata->get_irq_data_ready = st_sensors_i2c_get_irq; |
77 | } | 78 | } |
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, | |||
111 | indio_dev->dev.parent = &spi->dev; | 111 | indio_dev->dev.parent = &spi->dev; |
112 | indio_dev->name = spi->modalias; | 112 | indio_dev->name = spi->modalias; |
113 | 113 | ||
114 | sdata->dev = &spi->dev; | ||
114 | sdata->tf = &st_sensors_tf_spi; | 115 | sdata->tf = &st_sensors_tf_spi; |
115 | sdata->get_irq_data_ready = st_sensors_spi_get_irq; | 116 | sdata->get_irq_data_ready = st_sensors_spi_get_irq; |
116 | } | 117 | } |
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, | |||
67 | return -ENOMEM; | 67 | return -ENOMEM; |
68 | 68 | ||
69 | gdata = iio_priv(indio_dev); | 69 | gdata = iio_priv(indio_dev); |
70 | gdata->dev = &client->dev; | ||
71 | st_sensors_of_i2c_probe(client, st_gyro_of_match); | 70 | st_sensors_of_i2c_probe(client, st_gyro_of_match); |
72 | 71 | ||
73 | st_sensors_i2c_configure(indio_dev, client, gdata); | 72 | 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) | |||
29 | return -ENOMEM; | 29 | return -ENOMEM; |
30 | 30 | ||
31 | gdata = iio_priv(indio_dev); | 31 | gdata = iio_priv(indio_dev); |
32 | gdata->dev = &spi->dev; | ||
33 | 32 | ||
34 | st_sensors_spi_configure(indio_dev, spi, gdata); | 33 | st_sensors_spi_configure(indio_dev, spi, gdata); |
35 | 34 | ||
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, | |||
51 | return -ENOMEM; | 51 | return -ENOMEM; |
52 | 52 | ||
53 | mdata = iio_priv(indio_dev); | 53 | mdata = iio_priv(indio_dev); |
54 | mdata->dev = &client->dev; | ||
55 | st_sensors_of_i2c_probe(client, st_magn_of_match); | 54 | st_sensors_of_i2c_probe(client, st_magn_of_match); |
56 | 55 | ||
57 | st_sensors_i2c_configure(indio_dev, client, mdata); | 56 | 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) | |||
29 | return -ENOMEM; | 29 | return -ENOMEM; |
30 | 30 | ||
31 | mdata = iio_priv(indio_dev); | 31 | mdata = iio_priv(indio_dev); |
32 | mdata->dev = &spi->dev; | ||
33 | 32 | ||
34 | st_sensors_spi_configure(indio_dev, spi, mdata); | 33 | st_sensors_spi_configure(indio_dev, spi, mdata); |
35 | 34 | ||
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, | |||
51 | return -ENOMEM; | 51 | return -ENOMEM; |
52 | 52 | ||
53 | press_data = iio_priv(indio_dev); | 53 | press_data = iio_priv(indio_dev); |
54 | press_data->dev = &client->dev; | ||
55 | st_sensors_of_i2c_probe(client, st_press_of_match); | 54 | st_sensors_of_i2c_probe(client, st_press_of_match); |
56 | 55 | ||
57 | st_sensors_i2c_configure(indio_dev, client, press_data); | 56 | 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) | |||
29 | return -ENOMEM; | 29 | return -ENOMEM; |
30 | 30 | ||
31 | press_data = iio_priv(indio_dev); | 31 | press_data = iio_priv(indio_dev); |
32 | press_data->dev = &spi->dev; | ||
33 | 32 | ||
34 | st_sensors_spi_configure(indio_dev, spi, press_data); | 33 | st_sensors_spi_configure(indio_dev, spi, press_data); |
35 | 34 | ||