Linux IIO development
 help / color / mirror / Atom feed
* [PATCH 1/9] iio: interrupt-trigger: Remove no-op trigger ops
@ 2021-10-31 14:21 Lars-Peter Clausen
  2021-10-31 14:21 ` [PATCH 2/9] iio: sysfs-trigger: " Lars-Peter Clausen
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Lars-Peter Clausen @ 2021-10-31 14:21 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Michael Hennerich, Nuno Sa, Matt Ranostay, Linus Walleij,
	linux-iio, Lars-Peter Clausen

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>
---
 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) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-09 11:01 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-31 14:21 [PATCH 1/9] iio: interrupt-trigger: Remove no-op trigger ops Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 2/9] iio: sysfs-trigger: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 3/9] iio: ad_sigma_delta: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 4/9] iio: afe4403: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 5/9] iio: afe4404: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 6/9] iio: as3935: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 7/9] iio: atlas-sensor: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 8/9] iio: gp2ap020a00f: " Lars-Peter Clausen
2021-11-09 11:01   ` Linus Walleij
2021-10-31 14:21 ` [PATCH 9/9] iio: lmp91000: " Lars-Peter Clausen
2021-11-03 17:54 ` [PATCH 1/9] iio: interrupt-trigger: " Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox