From: Lars-Peter Clausen <lars@metafoo.de>
To: Jonathan Cameron <jic23@kernel.org>
Cc: Michael Hennerich <Michael.Hennerich@analog.com>,
Nuno Sa <Nuno.Sa@analog.com>, Matt Ranostay <mranostay@gmail.com>,
Linus Walleij <linus.walleij@linaro.org>,
linux-iio@vger.kernel.org, Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH 8/9] iio: gp2ap020a00f: Remove no-op trigger ops
Date: Sun, 31 Oct 2021 15:21:29 +0100 [thread overview]
Message-ID: <20211031142130.20791-8-lars@metafoo.de> (raw)
In-Reply-To: <20211031142130.20791-1-lars@metafoo.de>
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>
---
drivers/iio/light/gp2ap020a00f.c | 5 -----
1 file changed, 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);
--
2.20.1
next prev parent reply other threads:[~2021-10-31 14:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-31 14:21 [PATCH 1/9] iio: interrupt-trigger: Remove no-op trigger ops Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 2/9] iio: sysfs-trigger: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 3/9] iio: ad_sigma_delta: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 4/9] iio: afe4403: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 5/9] iio: afe4404: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 6/9] iio: as3935: " Lars-Peter Clausen
2021-10-31 14:21 ` [PATCH 7/9] iio: atlas-sensor: " Lars-Peter Clausen
2021-10-31 14:21 ` Lars-Peter Clausen [this message]
2021-11-09 11:01 ` [PATCH 8/9] iio: gp2ap020a00f: " Linus Walleij
2021-10-31 14:21 ` [PATCH 9/9] iio: lmp91000: " Lars-Peter Clausen
2021-11-03 17:54 ` [PATCH 1/9] iio: interrupt-trigger: " Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211031142130.20791-8-lars@metafoo.de \
--to=lars@metafoo.de \
--cc=Michael.Hennerich@analog.com \
--cc=Nuno.Sa@analog.com \
--cc=jic23@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=mranostay@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox