mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 16:29:59 +00:00
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>
This commit is contained in:
parent
cd21413947
commit
4d03166656
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue