Re: [PATCH v2 1/3] iio: accel: bmc150: Removed unused bmc150_accel_dat irq member

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

 



On Mon, Nov 30, 2020 at 4:20 PM Hans de Goede <hdegoede@xxxxxxxxxx> wrote:
>
> The bmc150_accel_dat struct irq member is only ever used inside
> bmc150_accel_core_probe, drop it and just use the function argument
> directly.

FWIW, for all three
Reviewed-by: Andy Shevchenko <andy.shevchenko@xxxxxxxxx>

> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>
> ---
>  drivers/iio/accel/bmc150-accel-core.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c
> index 48435865fdaf..088716d55855 100644
> --- a/drivers/iio/accel/bmc150-accel-core.c
> +++ b/drivers/iio/accel/bmc150-accel-core.c
> @@ -183,7 +183,6 @@ enum bmc150_accel_trigger_id {
>
>  struct bmc150_accel_data {
>         struct regmap *regmap;
> -       int irq;
>         struct bmc150_accel_interrupt interrupts[BMC150_ACCEL_INTERRUPTS];
>         struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS];
>         struct mutex mutex;
> @@ -1568,7 +1567,6 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
>
>         data = iio_priv(indio_dev);
>         dev_set_drvdata(dev, indio_dev);
> -       data->irq = irq;
>
>         data->regmap = regmap;
>
> @@ -1599,9 +1597,8 @@ int bmc150_accel_core_probe(struct device *dev, struct regmap *regmap, int irq,
>                 return ret;
>         }
>
> -       if (data->irq > 0) {
> -               ret = devm_request_threaded_irq(
> -                                               dev, data->irq,
> +       if (irq > 0) {
> +               ret = devm_request_threaded_irq(dev, irq,
>                                                 bmc150_accel_irq_handler,
>                                                 bmc150_accel_irq_thread_handler,
>                                                 IRQF_TRIGGER_RISING,
> --
> 2.28.0
>


-- 
With Best Regards,
Andy Shevchenko




[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