Commit 2d323927 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

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: default avatarLars-Peter Clausen <lars@metafoo.de>
Link: https://lore.kernel.org/r/20211031142130.20791-1-lars@metafoo.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 3c33b7b8
...@@ -25,9 +25,6 @@ static irqreturn_t iio_interrupt_trigger_poll(int irq, void *private) ...@@ -25,9 +25,6 @@ static irqreturn_t iio_interrupt_trigger_poll(int irq, void *private)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static const struct iio_trigger_ops iio_interrupt_trigger_ops = {
};
static int iio_interrupt_trigger_probe(struct platform_device *pdev) static int iio_interrupt_trigger_probe(struct platform_device *pdev)
{ {
struct iio_interrupt_trigger_info *trig_info; struct iio_interrupt_trigger_info *trig_info;
...@@ -58,7 +55,6 @@ static int iio_interrupt_trigger_probe(struct platform_device *pdev) ...@@ -58,7 +55,6 @@ static int iio_interrupt_trigger_probe(struct platform_device *pdev)
} }
iio_trigger_set_drvdata(trig, trig_info); iio_trigger_set_drvdata(trig, trig_info);
trig_info->irq = irq; trig_info->irq = irq;
trig->ops = &iio_interrupt_trigger_ops;
ret = request_irq(irq, iio_interrupt_trigger_poll, ret = request_irq(irq, iio_interrupt_trigger_poll,
irqflags, trig->name, trig); irqflags, trig->name, trig);
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment