Commit 9662afc9 authored by Lars-Peter Clausen's avatar Lars-Peter Clausen Committed by Jonathan Cameron

iio: gp2ap020a00f: 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-8-lars@metafoo.deSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent f3df6c73
...@@ -1467,9 +1467,6 @@ static const struct iio_buffer_setup_ops gp2ap020a00f_buffer_setup_ops = { ...@@ -1467,9 +1467,6 @@ static const struct iio_buffer_setup_ops gp2ap020a00f_buffer_setup_ops = {
.predisable = &gp2ap020a00f_buffer_predisable, .predisable = &gp2ap020a00f_buffer_predisable,
}; };
static const struct iio_trigger_ops gp2ap020a00f_trigger_ops = {
};
static int gp2ap020a00f_probe(struct i2c_client *client, static int gp2ap020a00f_probe(struct i2c_client *client,
const struct i2c_device_id *id) const struct i2c_device_id *id)
{ {
...@@ -1550,8 +1547,6 @@ static int gp2ap020a00f_probe(struct i2c_client *client, ...@@ -1550,8 +1547,6 @@ static int gp2ap020a00f_probe(struct i2c_client *client,
goto error_uninit_buffer; goto error_uninit_buffer;
} }
data->trig->ops = &gp2ap020a00f_trigger_ops;
init_irq_work(&data->work, gp2ap020a00f_iio_trigger_work); init_irq_work(&data->work, gp2ap020a00f_iio_trigger_work);
err = iio_trigger_register(data->trig); err = iio_trigger_register(data->trig);
......
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