iio:pressure: Removed unnecessary parameter on common_probe function
authorDenis CIOCCA <denis.ciocca@st.com>
Fri, 3 Oct 2014 15:35:39 +0000 (17:35 +0200)
committerJonathan Cameron <jic23@kernel.org>
Sat, 4 Oct 2014 10:25:38 +0000 (11:25 +0100)
Signed-off-by: Denis Ciocca <denis.ciocca@st.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
drivers/iio/pressure/st_pressure.h
drivers/iio/pressure/st_pressure_core.c
drivers/iio/pressure/st_pressure_i2c.c
drivers/iio/pressure/st_pressure_spi.c

index 242943c0c4e496c4b054bb5426cc06c5380accdb..f5f41490060b95be8e38ce5fb79bcee15e0dffc1 100644 (file)
@@ -26,8 +26,7 @@ static const struct st_sensors_platform_data default_press_pdata = {
        .drdy_int_pin = 1,
 };
 
-int st_press_common_probe(struct iio_dev *indio_dev,
-                                       struct st_sensors_platform_data *pdata);
+int st_press_common_probe(struct iio_dev *indio_dev);
 void st_press_common_remove(struct iio_dev *indio_dev);
 
 #ifdef CONFIG_IIO_BUFFER
index 9563118c4d36ac997f73d6c355a0b481a42e74e1..ee2ef7def097fc44ad22581c07cad3c2c27fc354 100644 (file)
@@ -409,8 +409,7 @@ static const struct iio_trigger_ops st_press_trigger_ops = {
 #define ST_PRESS_TRIGGER_OPS NULL
 #endif
 
-int st_press_common_probe(struct iio_dev *indio_dev,
-                               struct st_sensors_platform_data *plat_data)
+int st_press_common_probe(struct iio_dev *indio_dev)
 {
        struct st_sensor_data *pdata = iio_priv(indio_dev);
        int irq = pdata->get_irq_data_ready(indio_dev);
@@ -439,11 +438,11 @@ int st_press_common_probe(struct iio_dev *indio_dev,
        pdata->odr = pdata->sensor_settings->odr.odr_avl[0].hz;
 
        /* Some devices don't support a data ready pin. */
-       if (!plat_data && pdata->sensor_settings->drdy_irq.addr)
-               plat_data =
+       if (!pdata->dev->platform_data && pdata->sensor_settings->drdy_irq.addr)
+               pdata->dev->platform_data =
                        (struct st_sensors_platform_data *)&default_press_pdata;
 
-       err = st_sensors_init_sensor(indio_dev, plat_data);
+       err = st_sensors_init_sensor(indio_dev, pdata->dev->platform_data);
        if (err < 0)
                return err;
 
index acaf165260bba1d98e71f132fb7259c9f1a179d6..dd733513152d9bb9b9bb4aec285ac9a6b90aadf3 100644 (file)
@@ -56,7 +56,7 @@ static int st_press_i2c_probe(struct i2c_client *client,
 
        st_sensors_i2c_configure(indio_dev, client, pdata);
 
-       err = st_press_common_probe(indio_dev, client->dev.platform_data);
+       err = st_press_common_probe(indio_dev);
        if (err < 0)
                return err;
 
index f45d430ec52968bf42cb7b634263709fb5db69f4..98c3e8e517aed8f3d5f696b40dd9a4c1f5bf2d6e 100644 (file)
@@ -33,7 +33,7 @@ static int st_press_spi_probe(struct spi_device *spi)
 
        st_sensors_spi_configure(indio_dev, spi, pdata);
 
-       err = st_press_common_probe(indio_dev, spi->dev.platform_data);
+       err = st_press_common_probe(indio_dev);
        if (err < 0)
                return err;