Commit 585ed27d authored by Colin Ian King's avatar Colin Ian King Committed by Jonathan Cameron

iio: accel: st_accel: remove redundant pointer pdata

Pointer pdata is being assigned but it is never being used, hence
it is redundant and can be removed. Cleans up clang warning:

drivers/iio/accel/st_accel_core.c:952:3: warning: Value stored to 'pdata'
is never read
Signed-off-by: default avatarColin Ian King <>
Signed-off-by: default avatarJonathan Cameron <>
parent 4c42bef0
......@@ -920,8 +920,6 @@ static const struct iio_trigger_ops st_accel_trigger_ops = {
int st_accel_common_probe(struct iio_dev *indio_dev)
struct st_sensor_data *adata = iio_priv(indio_dev);
struct st_sensors_platform_data *pdata =
(struct st_sensors_platform_data *)adata->dev->platform_data;
int irq = adata->get_irq_data_ready(indio_dev);
int err;
......@@ -948,9 +946,6 @@ int st_accel_common_probe(struct iio_dev *indio_dev)
adata->odr = adata->sensor_settings->odr.odr_avl[0].hz;
if (!pdata)
pdata = (struct st_sensors_platform_data *)&default_accel_pdata;
err = st_sensors_init_sensor(indio_dev, adata->dev->platform_data);
if (err < 0)
goto st_accel_power_off;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment