Commit 6a9a9036 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

iio: lmp91000: 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-9-lars@metafoo.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 9662afc9
...@@ -271,9 +271,6 @@ static int lmp91000_buffer_cb(const void *val, void *private) ...@@ -271,9 +271,6 @@ static int lmp91000_buffer_cb(const void *val, void *private)
return 0; return 0;
} }
static const struct iio_trigger_ops lmp91000_trigger_ops = {
};
static int lmp91000_buffer_postenable(struct iio_dev *indio_dev) static int lmp91000_buffer_postenable(struct iio_dev *indio_dev)
{ {
struct lmp91000_data *data = iio_priv(indio_dev); struct lmp91000_data *data = iio_priv(indio_dev);
...@@ -330,7 +327,6 @@ static int lmp91000_probe(struct i2c_client *client, ...@@ -330,7 +327,6 @@ static int lmp91000_probe(struct i2c_client *client,
return -ENOMEM; return -ENOMEM;
} }
data->trig->ops = &lmp91000_trigger_ops;
init_completion(&data->completion); init_completion(&data->completion);
ret = lmp91000_read_config(data); ret = lmp91000_read_config(data);
......
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