Commit 35ce398a authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

iio: afe4404: 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-5-lars@metafoo.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 26ae5ed3
...@@ -347,9 +347,6 @@ static irqreturn_t afe4404_trigger_handler(int irq, void *private) ...@@ -347,9 +347,6 @@ static irqreturn_t afe4404_trigger_handler(int irq, void *private)
return IRQ_HANDLED; return IRQ_HANDLED;
} }
static const struct iio_trigger_ops afe4404_trigger_ops = {
};
/* Default timings from data-sheet */ /* Default timings from data-sheet */
#define AFE4404_TIMING_PAIRS \ #define AFE4404_TIMING_PAIRS \
{ AFE440X_PRPCOUNT, 39999 }, \ { AFE440X_PRPCOUNT, 39999 }, \
...@@ -537,8 +534,6 @@ static int afe4404_probe(struct i2c_client *client, ...@@ -537,8 +534,6 @@ static int afe4404_probe(struct i2c_client *client,
iio_trigger_set_drvdata(afe->trig, indio_dev); iio_trigger_set_drvdata(afe->trig, indio_dev);
afe->trig->ops = &afe4404_trigger_ops;
ret = iio_trigger_register(afe->trig); ret = iio_trigger_register(afe->trig);
if (ret) { if (ret) {
dev_err(afe->dev, "Unable to register IIO trigger\n"); dev_err(afe->dev, "Unable to register IIO trigger\n");
......
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