summaryrefslogtreecommitdiff
path: root/drivers/iio/accel/mxc4005.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2021-03-09 22:36:14 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-03-25 22:13:50 +0300
commit8a2252201656a147a9d7b1892028cef15869032e (patch)
treead2c28409741d5215755229563afa3720f4d9f08 /drivers/iio/accel/mxc4005.c
parent995071d36bb9804b644265450142fcb91c427ee8 (diff)
downloadlinux-8a2252201656a147a9d7b1892028cef15869032e.tar.xz
iio: fix devm_iio_trigger_alloc with parent.cocci
Use cocci semantic patch: @@ expression trigger, P; @@ trigger = devm_iio_trigger_alloc(P, ...); ... - trigger->dev.parent = P; To remove trigger->dev.parent, since it is set by default. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Link: https://lore.kernel.org/r/20210309193620.2176163-3-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/accel/mxc4005.c')
-rw-r--r--drivers/iio/accel/mxc4005.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c
index 0f8fd687866d..fb3cbaa62bd8 100644
--- a/drivers/iio/accel/mxc4005.c
+++ b/drivers/iio/accel/mxc4005.c
@@ -450,7 +450,6 @@ static int mxc4005_probe(struct i2c_client *client,
return ret;
}
- data->dready_trig->dev.parent = &client->dev;
data->dready_trig->ops = &mxc4005_trigger_ops;
iio_trigger_set_drvdata(data->dready_trig, indio_dev);
indio_dev->trig = data->dready_trig;