summaryrefslogtreecommitdiffstats
path: root/drivers/iio/adc/max1027.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2021-03-09 11:36:14 -0800
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-03-25 19:13:50 +0000
commit8a2252201656a147a9d7b1892028cef15869032e (patch)
treead2c28409741d5215755229563afa3720f4d9f08 /drivers/iio/adc/max1027.c
parent995071d36bb9804b644265450142fcb91c427ee8 (diff)
downloadlinux-8a2252201656a147a9d7b1892028cef15869032e.tar.bz2
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/adc/max1027.c')
-rw-r--r--drivers/iio/adc/max1027.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/iio/adc/max1027.c b/drivers/iio/adc/max1027.c
index ca1dff3924ff..e3c8ec107722 100644
--- a/drivers/iio/adc/max1027.c
+++ b/drivers/iio/adc/max1027.c
@@ -473,7 +473,6 @@ static int max1027_probe(struct spi_device *spi)
}
st->trig->ops = &max1027_trigger_ops;
- st->trig->dev.parent = &spi->dev;
iio_trigger_set_drvdata(st->trig, indio_dev);
ret = devm_iio_trigger_register(&indio_dev->dev,
st->trig);