mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-05-24 10:39:52 +00:00
iio:accel: Removed unnecessary parameter on common_probe function
Signed-off-by: Denis Ciocca <denis.ciocca@st.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
This commit is contained in:
parent
a7ee8839da
commit
b6e6bda626
4 changed files with 7 additions and 9 deletions
|
@ -33,8 +33,7 @@ static const struct st_sensors_platform_data default_accel_pdata = {
|
||||||
.drdy_int_pin = 1,
|
.drdy_int_pin = 1,
|
||||||
};
|
};
|
||||||
|
|
||||||
int st_accel_common_probe(struct iio_dev *indio_dev,
|
int st_accel_common_probe(struct iio_dev *indio_dev);
|
||||||
struct st_sensors_platform_data *pdata);
|
|
||||||
void st_accel_common_remove(struct iio_dev *indio_dev);
|
void st_accel_common_remove(struct iio_dev *indio_dev);
|
||||||
|
|
||||||
#ifdef CONFIG_IIO_BUFFER
|
#ifdef CONFIG_IIO_BUFFER
|
||||||
|
|
|
@ -457,8 +457,7 @@ static const struct iio_trigger_ops st_accel_trigger_ops = {
|
||||||
#define ST_ACCEL_TRIGGER_OPS NULL
|
#define ST_ACCEL_TRIGGER_OPS NULL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int st_accel_common_probe(struct iio_dev *indio_dev,
|
int st_accel_common_probe(struct iio_dev *indio_dev)
|
||||||
struct st_sensors_platform_data *plat_data)
|
|
||||||
{
|
{
|
||||||
struct st_sensor_data *adata = iio_priv(indio_dev);
|
struct st_sensor_data *adata = iio_priv(indio_dev);
|
||||||
int irq = adata->get_irq_data_ready(indio_dev);
|
int irq = adata->get_irq_data_ready(indio_dev);
|
||||||
|
@ -484,11 +483,11 @@ int st_accel_common_probe(struct iio_dev *indio_dev,
|
||||||
&adata->sensor_settings->fs.fs_avl[0];
|
&adata->sensor_settings->fs.fs_avl[0];
|
||||||
adata->odr = adata->sensor_settings->odr.odr_avl[0].hz;
|
adata->odr = adata->sensor_settings->odr.odr_avl[0].hz;
|
||||||
|
|
||||||
if (!plat_data)
|
if (!adata->dev->platform_data)
|
||||||
plat_data =
|
adata->dev->platform_data =
|
||||||
(struct st_sensors_platform_data *)&default_accel_pdata;
|
(struct st_sensors_platform_data *)&default_accel_pdata;
|
||||||
|
|
||||||
err = st_sensors_init_sensor(indio_dev, plat_data);
|
err = st_sensors_init_sensor(indio_dev, adata->dev->platform_data);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
|
@ -84,7 +84,7 @@ static int st_accel_i2c_probe(struct i2c_client *client,
|
||||||
|
|
||||||
st_sensors_i2c_configure(indio_dev, client, adata);
|
st_sensors_i2c_configure(indio_dev, client, adata);
|
||||||
|
|
||||||
err = st_accel_common_probe(indio_dev, client->dev.platform_data);
|
err = st_accel_common_probe(indio_dev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ static int st_accel_spi_probe(struct spi_device *spi)
|
||||||
|
|
||||||
st_sensors_spi_configure(indio_dev, spi, adata);
|
st_sensors_spi_configure(indio_dev, spi, adata);
|
||||||
|
|
||||||
err = st_accel_common_probe(indio_dev, spi->dev.platform_data);
|
err = st_accel_common_probe(indio_dev);
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
return err;
|
return err;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue