Re: [PATCH 1/9] iio: interrupt-trigger: Remove no-op trigger ops

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

 



On Sun, 31 Oct 2021 15:21:22 +0100
Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:

> The IIO core handles a trigger ops with all NULL callbacks the
> same as if the trigger ops itself was NULL.
> 
> Remove the empty trigger ops from the interrupt trigger driver to slightly
> reduce the boilerplate code. Object size of the driver module is also
> slightly reduced.
> 
> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
Good spot - I was kind of assuming we didn't protect all call sites
but seems that we do so good to get rid of these

Series applied to the togreg branch of iio.git and pushed out as testing
for all the normal reasons.

Thanks,

Jonathan

> ---
>  drivers/iio/trigger/iio-trig-interrupt.c | 4 ----
>  1 file changed, 4 deletions(-)
> 
> diff --git a/drivers/iio/trigger/iio-trig-interrupt.c b/drivers/iio/trigger/iio-trig-interrupt.c
> index f746c460bf2a..5f49cd105fae 100644
> --- a/drivers/iio/trigger/iio-trig-interrupt.c
> +++ b/drivers/iio/trigger/iio-trig-interrupt.c
> @@ -25,9 +25,6 @@ static irqreturn_t iio_interrupt_trigger_poll(int irq, void *private)
>  	return IRQ_HANDLED;
>  }
>  
> -static const struct iio_trigger_ops iio_interrupt_trigger_ops = {
> -};
> -
>  static int iio_interrupt_trigger_probe(struct platform_device *pdev)
>  {
>  	struct iio_interrupt_trigger_info *trig_info;
> @@ -58,7 +55,6 @@ static int iio_interrupt_trigger_probe(struct platform_device *pdev)
>  	}
>  	iio_trigger_set_drvdata(trig, trig_info);
>  	trig_info->irq = irq;
> -	trig->ops = &iio_interrupt_trigger_ops;
>  	ret = request_irq(irq, iio_interrupt_trigger_poll,
>  			  irqflags, trig->name, trig);
>  	if (ret) {




[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