summaryrefslogtreecommitdiff
path: root/drivers/iio/potentiostat/lmp91000.c
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2021-03-09 22:36:17 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-03-25 22:13:50 +0300
commit4d031666560da23dfae3892335551b2405ee92e1 (patch)
tree92238baa7c35ae16a3819ab2c770a6ebeb86eeb8 /drivers/iio/potentiostat/lmp91000.c
parentcd214139471a2b2135b4fbc2a7f9355a5df68f86 (diff)
downloadlinux-4d031666560da23dfae3892335551b2405ee92e1.tar.xz
iio: lmp91000: Remove code to set trigger parent
iio_trigger_set_drvdata() sets the trigger device parent to first argument of viio_trigger_alloc(), no need to do it again in the driver code. Given data->dev is dev, and we call devm_iio_trigger_alloc with dev instead of data->dev, we do not have to set data->trig->dev.parent to dev anymore. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Reviewed-by: Matt Ranostay <matt.ranostay@konsulko.com> Link: https://lore.kernel.org/r/20210309193620.2176163-6-gwendal@chromium.org Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/potentiostat/lmp91000.c')
-rw-r--r--drivers/iio/potentiostat/lmp91000.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/potentiostat/lmp91000.c b/drivers/iio/potentiostat/lmp91000.c
index f34ca769dc20..8a9c576616ee 100644
--- a/drivers/iio/potentiostat/lmp91000.c
+++ b/drivers/iio/potentiostat/lmp91000.c
@@ -322,7 +322,7 @@ static int lmp91000_probe(struct i2c_client *client,
return PTR_ERR(data->regmap);
}
- data->trig = devm_iio_trigger_alloc(data->dev, "%s-mux%d",
+ data->trig = devm_iio_trigger_alloc(dev, "%s-mux%d",
indio_dev->name, indio_dev->id);
if (!data->trig) {
dev_err(dev, "cannot allocate iio trigger.\n");
@@ -330,7 +330,6 @@ static int lmp91000_probe(struct i2c_client *client,
}
data->trig->ops = &lmp91000_trigger_ops;
- data->trig->dev.parent = dev;
init_completion(&data->completion);
ret = lmp91000_read_config(data);