From: Arnd Bergmann <arnd@kernel.org>
To: linux-kernel@vger.kernel.org,
Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-iio@vger.kernel.org
Subject: [PATCH 16/34] iio: ad5755: hook up of_device_id lookup to platform driver
Date: Wed, 3 Apr 2024 10:06:34 +0200 [thread overview]
Message-ID: <20240403080702.3509288-17-arnd@kernel.org> (raw)
In-Reply-To: <20240403080702.3509288-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@arndb.de>
When the driver is built-in, 'make W=1' warns about an unused
ID table:
drivers/iio/dac/ad5755.c:866:34: error: 'ad5755_of_match' defined but not used [-Werror=unused-const-variable=]
866 | static const struct of_device_id ad5755_of_match[] = {
While the data is duplicated in the spi_device_id, it's common
to use the actual OF compatible strings in the driver.
Since there are no in-tree users of plain platform devices, the
spi_device_id table could actually be dropped entirely with this.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
drivers/iio/dac/ad5755.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c
index 404865e35460..5c1e7f428c25 100644
--- a/drivers/iio/dac/ad5755.c
+++ b/drivers/iio/dac/ad5755.c
@@ -876,6 +876,7 @@ MODULE_DEVICE_TABLE(of, ad5755_of_match);
static struct spi_driver ad5755_driver = {
.driver = {
.name = "ad5755",
+ .of_match_table = ad5755_of_match,
},
.probe = ad5755_probe,
.id_table = ad5755_id,
--
2.39.2
next prev parent reply other threads:[~2024-04-03 8:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-03 8:06 [PATCH 00/34] address all -Wunused-const warnings Arnd Bergmann
2024-04-03 8:06 ` Arnd Bergmann [this message]
2024-04-03 9:36 ` [PATCH 16/34] iio: ad5755: hook up of_device_id lookup to platform driver Andy Shevchenko
2024-04-03 9:55 ` Krzysztof Kozlowski
2024-04-03 10:01 ` Arnd Bergmann
2024-04-06 15:30 ` Jonathan Cameron
2024-04-06 15:31 ` Jonathan Cameron
2024-04-06 5:20 ` [PATCH 00/34] address all -Wunused-const warnings patchwork-bot+netdevbpf
2024-04-10 8:02 ` (subset) " Sebastian Reichel
2024-04-22 8:16 ` Michael Ellerman
2025-01-27 13:24 ` Andy Shevchenko
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=20240403080702.3509288-17-arnd@kernel.org \
--to=arnd@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=arnd@arndb.de \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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