diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2021-03-09 20:36:14 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2021-03-25 20:13:50 +0100 |
commit | 8a2252201656a147a9d7b1892028cef15869032e (patch) | |
tree | ad2c28409741d5215755229563afa3720f4d9f08 /drivers/iio/proximity/sx9500.c | |
parent | iio: set default trig->dev.parent (diff) | |
download | linux-8a2252201656a147a9d7b1892028cef15869032e.tar.xz linux-8a2252201656a147a9d7b1892028cef15869032e.zip |
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/proximity/sx9500.c')
-rw-r--r-- | drivers/iio/proximity/sx9500.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index 67353d33af94..a87f4a8e4327 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -950,7 +950,6 @@ static int sx9500_probe(struct i2c_client *client, if (!data->trig) return -ENOMEM; - data->trig->dev.parent = &client->dev; data->trig->ops = &sx9500_trigger_ops; iio_trigger_set_drvdata(data->trig, indio_dev); |