Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

iio: interrupt-trigger: Remove no-op trigger ops

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@metafoo.de>
Link: https://lore.kernel.org/r/20211031142130.20791-1-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Lars-Peter Clausen and committed by
Jonathan Cameron
2d323927 3c33b7b8

-4
-4
drivers/iio/trigger/iio-trig-interrupt.c
··· 25 25 return IRQ_HANDLED; 26 26 } 27 27 28 - static const struct iio_trigger_ops iio_interrupt_trigger_ops = { 29 - }; 30 - 31 28 static int iio_interrupt_trigger_probe(struct platform_device *pdev) 32 29 { 33 30 struct iio_interrupt_trigger_info *trig_info; ··· 55 58 } 56 59 iio_trigger_set_drvdata(trig, trig_info); 57 60 trig_info->irq = irq; 58 - trig->ops = &iio_interrupt_trigger_ops; 59 61 ret = request_irq(irq, iio_interrupt_trigger_poll, 60 62 irqflags, trig->name, trig); 61 63 if (ret) {