diff options
author | Denis CIOCCA <denis.ciocca@st.com> | 2014-10-03 11:35:39 -0400 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-10-04 06:25:38 -0400 |
commit | 0baa3fc1b6c1e928260ca099cbdf551ced2cbfa3 (patch) | |
tree | ca1fa455b1b820bf2843d3bd175e876715c7c216 | |
parent | 2109eb4c0c7d21669ae2ad0cda90c438b5470bf3 (diff) |
iio:pressure: Removed unnecessary parameter on common_probe function
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r-- | drivers/iio/pressure/st_pressure.h | 3 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_core.c | 9 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_i2c.c | 2 | ||||
-rw-r--r-- | drivers/iio/pressure/st_pressure_spi.c | 2 |
4 files changed, 7 insertions, 9 deletions
diff --git a/drivers/iio/pressure/st_pressure.h b/drivers/iio/pressure/st_pressure.h index 242943c0c4e4..f5f41490060b 100644 --- a/drivers/iio/pressure/st_pressure.h +++ b/drivers/iio/pressure/st_pressure.h | |||
@@ -26,8 +26,7 @@ static const struct st_sensors_platform_data default_press_pdata = { | |||
26 | .drdy_int_pin = 1, | 26 | .drdy_int_pin = 1, |
27 | }; | 27 | }; |
28 | 28 | ||
29 | int st_press_common_probe(struct iio_dev *indio_dev, | 29 | int st_press_common_probe(struct iio_dev *indio_dev); |
30 | struct st_sensors_platform_data *pdata); | ||
31 | void st_press_common_remove(struct iio_dev *indio_dev); | 30 | void st_press_common_remove(struct iio_dev *indio_dev); |
32 | 31 | ||
33 | #ifdef CONFIG_IIO_BUFFER | 32 | #ifdef CONFIG_IIO_BUFFER |
diff --git a/drivers/iio/pressure/st_pressure_core.c b/drivers/iio/pressure/st_pressure_core.c index 9563118c4d36..ee2ef7def097 100644 --- a/drivers/iio/pressure/st_pressure_core.c +++ b/drivers/iio/pressure/st_pressure_core.c | |||
@@ -409,8 +409,7 @@ static const struct iio_trigger_ops st_press_trigger_ops = { | |||
409 | #define ST_PRESS_TRIGGER_OPS NULL | 409 | #define ST_PRESS_TRIGGER_OPS NULL |
410 | #endif | 410 | #endif |
411 | 411 | ||
412 | int st_press_common_probe(struct iio_dev *indio_dev, | 412 | int st_press_common_probe(struct iio_dev *indio_dev) |
413 | struct st_sensors_platform_data *plat_data) | ||
414 | { | 413 | { |
415 | struct st_sensor_data *pdata = iio_priv(indio_dev); | 414 | struct st_sensor_data *pdata = iio_priv(indio_dev); |
416 | int irq = pdata->get_irq_data_ready(indio_dev); | 415 | int irq = pdata->get_irq_data_ready(indio_dev); |
@@ -439,11 +438,11 @@ int st_press_common_probe(struct iio_dev *indio_dev, | |||
439 | pdata->odr = pdata->sensor_settings->odr.odr_avl[0].hz; | 438 | pdata->odr = pdata->sensor_settings->odr.odr_avl[0].hz; |
440 | 439 | ||
441 | /* Some devices don't support a data ready pin. */ | 440 | /* Some devices don't support a data ready pin. */ |
442 | if (!plat_data && pdata->sensor_settings->drdy_irq.addr) | 441 | if (!pdata->dev->platform_data && pdata->sensor_settings->drdy_irq.addr) |
443 | plat_data = | 442 | pdata->dev->platform_data = |
444 | (struct st_sensors_platform_data *)&default_press_pdata; | 443 | (struct st_sensors_platform_data *)&default_press_pdata; |
445 | 444 | ||
446 | err = st_sensors_init_sensor(indio_dev, plat_data); | 445 | err = st_sensors_init_sensor(indio_dev, pdata->dev->platform_data); |
447 | if (err < 0) | 446 | if (err < 0) |
448 | return err; | 447 | return err; |
449 | 448 | ||
diff --git a/drivers/iio/pressure/st_pressure_i2c.c b/drivers/iio/pressure/st_pressure_i2c.c index acaf165260bb..dd733513152d 100644 --- a/drivers/iio/pressure/st_pressure_i2c.c +++ b/drivers/iio/pressure/st_pressure_i2c.c | |||
@@ -56,7 +56,7 @@ static int st_press_i2c_probe(struct i2c_client *client, | |||
56 | 56 | ||
57 | st_sensors_i2c_configure(indio_dev, client, pdata); | 57 | st_sensors_i2c_configure(indio_dev, client, pdata); |
58 | 58 | ||
59 | err = st_press_common_probe(indio_dev, client->dev.platform_data); | 59 | err = st_press_common_probe(indio_dev); |
60 | if (err < 0) | 60 | if (err < 0) |
61 | return err; | 61 | return err; |
62 | 62 | ||
diff --git a/drivers/iio/pressure/st_pressure_spi.c b/drivers/iio/pressure/st_pressure_spi.c index f45d430ec529..98c3e8e517ae 100644 --- a/drivers/iio/pressure/st_pressure_spi.c +++ b/drivers/iio/pressure/st_pressure_spi.c | |||
@@ -33,7 +33,7 @@ static int st_press_spi_probe(struct spi_device *spi) | |||
33 | 33 | ||
34 | st_sensors_spi_configure(indio_dev, spi, pdata); | 34 | st_sensors_spi_configure(indio_dev, spi, pdata); |
35 | 35 | ||
36 | err = st_press_common_probe(indio_dev, spi->dev.platform_data); | 36 | err = st_press_common_probe(indio_dev); |
37 | if (err < 0) | 37 | if (err < 0) |
38 | return err; | 38 | return err; |
39 | 39 | ||