Re: [PATCH v2 3/7] iio: adis_trigger: Remove code to set trigger parent

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 10, 2020 at 10:42 PM Gwendal Grignou <gwendal@xxxxxxxxxxxx> wrote:
>
> Already done in boiler plate code.

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

>
> Signed-off-by: Gwendal Grignou <gwendal@xxxxxxxxxxxx>
> ---
>  drivers/iio/imu/adis_trigger.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/iio/imu/adis_trigger.c b/drivers/iio/imu/adis_trigger.c
> index 64e0ba51cb18..0f29e56200af 100644
> --- a/drivers/iio/imu/adis_trigger.c
> +++ b/drivers/iio/imu/adis_trigger.c
> @@ -27,13 +27,6 @@ static const struct iio_trigger_ops adis_trigger_ops = {
>         .set_trigger_state = &adis_data_rdy_trigger_set_state,
>  };
>
> -static void adis_trigger_setup(struct adis *adis)
> -{
> -       adis->trig->dev.parent = &adis->spi->dev;
> -       adis->trig->ops = &adis_trigger_ops;
> -       iio_trigger_set_drvdata(adis->trig, adis);
> -}
> -
>  static int adis_validate_irq_flag(struct adis *adis)
>  {
>         /*
> @@ -72,7 +65,8 @@ int devm_adis_probe_trigger(struct adis *adis, struct iio_dev *indio_dev)
>         if (!adis->trig)
>                 return -ENOMEM;
>
> -       adis_trigger_setup(adis);
> +       adis->trig->ops = &adis_trigger_ops;
> +       iio_trigger_set_drvdata(adis->trig, adis);
>
>         ret = adis_validate_irq_flag(adis);
>         if (ret)
> --
> 2.29.2.576.ga3fc446d84-goog
>



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux