summaryrefslogtreecommitdiff
path: root/drivers/iio/light/gp2ap020a00f.c
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2021-10-31 17:21:29 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2021-11-17 20:51:38 +0300
commit9662afc9059b79ed4efb8b90b2865f9c919c7fe4 (patch)
tree9e6bdaaf752968f21fefeaed412bf58af9f748d4 /drivers/iio/light/gp2ap020a00f.c
parentf3df6c739a8513ab81dd9d49c0329933620cfaa7 (diff)
downloadlinux-9662afc9059b79ed4efb8b90b2865f9c919c7fe4.tar.xz
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: Lars-Peter Clausen <lars@metafoo.de> Link: https://lore.kernel.org/r/20211031142130.20791-8-lars@metafoo.de Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light/gp2ap020a00f.c')
-rw-r--r--drivers/iio/light/gp2ap020a00f.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/iio/light/gp2ap020a00f.c b/drivers/iio/light/gp2ap020a00f.c
index d1d9f2d319e4..b820041159f7 100644
--- a/drivers/iio/light/gp2ap020a00f.c
+++ b/drivers/iio/light/gp2ap020a00f.c
@@ -1467,9 +1467,6 @@ static const struct iio_buffer_setup_ops gp2ap020a00f_buffer_setup_ops = {
.predisable = &gp2ap020a00f_buffer_predisable,
};
-static const struct iio_trigger_ops gp2ap020a00f_trigger_ops = {
-};
-
static int gp2ap020a00f_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@@ -1550,8 +1547,6 @@ static int gp2ap020a00f_probe(struct i2c_client *client,
goto error_uninit_buffer;
}
- data->trig->ops = &gp2ap020a00f_trigger_ops;
-
init_irq_work(&data->work, gp2ap020a00f_iio_trigger_work);
err = iio_trigger_register(data->trig);