iio: sysfs-trigger: Remove no-op trigger ops
authorLars-Peter Clausen <lars@metafoo.de>
Sun, 31 Oct 2021 14:21:23 +0000 (15:21 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 17 Nov 2021 17:51:36 +0000 (17:51 +0000)
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-2-lars@metafoo.de
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/trigger/iio-trig-sysfs.c

index e9adfff45b39b26e7c86f4f21ec720108bd3cb1f..2a4b75897910f852dda71e29fa8cf4d2ea676ef4 100644 (file)
@@ -124,9 +124,6 @@ static const struct attribute_group *iio_sysfs_trigger_attr_groups[] = {
        NULL
 };
 
-static const struct iio_trigger_ops iio_sysfs_trigger_ops = {
-};
-
 static int iio_sysfs_trigger_probe(int id)
 {
        struct iio_sysfs_trig *t;
@@ -156,7 +153,6 @@ static int iio_sysfs_trigger_probe(int id)
        }
 
        t->trig->dev.groups = iio_sysfs_trigger_attr_groups;
-       t->trig->ops = &iio_sysfs_trigger_ops;
        iio_trigger_set_drvdata(t->trig, t);
 
        t->work = IRQ_WORK_INIT_HARD(iio_sysfs_trigger_work);