diff options
author | Denis CIOCCA <denis.ciocca@st.com> | 2014-10-03 15:35:36 (GMT) |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2014-10-04 10:24:33 (GMT) |
commit | b6e6bda626972d895322474f41fb64a8a731cc0c (patch) | |
tree | c62c71dad27280d9431f9170c2871fca627d9c9b /drivers/iio/accel/st_accel_core.c | |
parent | a7ee8839daf21c4a3ca439733e7bed25f32e7954 (diff) | |
download | linux-b6e6bda626972d895322474f41fb64a8a731cc0c.tar.xz |
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>
Diffstat (limited to 'drivers/iio/accel/st_accel_core.c')
-rw-r--r-- | drivers/iio/accel/st_accel_core.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/iio/accel/st_accel_core.c b/drivers/iio/accel/st_accel_core.c index 7cbdfae..53f3262 100644 --- a/drivers/iio/accel/st_accel_core.c +++ b/drivers/iio/accel/st_accel_core.c @@ -457,8 +457,7 @@ static const struct iio_trigger_ops st_accel_trigger_ops = { #define ST_ACCEL_TRIGGER_OPS NULL #endif -int st_accel_common_probe(struct iio_dev *indio_dev, - struct st_sensors_platform_data *plat_data) +int st_accel_common_probe(struct iio_dev *indio_dev) { struct st_sensor_data *adata = iio_priv(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->odr = adata->sensor_settings->odr.odr_avl[0].hz; - if (!plat_data) - plat_data = + if (!adata->dev->platform_data) + adata->dev->platform_data = (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) return err; |