diff mbox series

[v2,5/7] iio: lmp91000: Remove code to set trigger parent

Message ID 20201210204211.967018-6-gwendal@chromium.org (mailing list archive)
State New, archived
Headers show
Series iio: Set default trigger device parent | expand

Commit Message

Gwendal Grignou Dec. 10, 2020, 8:42 p.m. UTC
Already done in boiler plate code

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
---
 drivers/iio/potentiostat/lmp91000.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Alexandru Ardelean Dec. 11, 2020, 8:04 a.m. UTC | #1
On Thu, Dec 10, 2020 at 10:42 PM Gwendal Grignou <gwendal@chromium.org> wrote:
>
> Already done in boiler plate code
>

Worth noting that 'data->dev == dev'

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
> ---
>  drivers/iio/potentiostat/lmp91000.c | 3 +--
>  1 file changed, 1 insertion(+), 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);
> --
> 2.29.2.576.ga3fc446d84-goog
>
diff mbox series

Patch

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);