From: Jean Delvare <jdelvare@suse.de>
To: linux-iio@vger.kernel.org
Cc: LKML <linux-kernel@vger.kernel.org>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>
Subject: [PATCH] iio:accel:dmard06: Optimize when CONFIG_OF isn't set
Date: Thu, 25 Aug 2022 14:40:12 +0200 [thread overview]
Message-ID: <20220825144012.24a33bb0@endymion.delvare> (raw)
When CONFIG_OF isn't set, we can optimize out dmard06_of_match as it
will never be used.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Lars-Peter Clausen <lars@metafoo.de>
---
drivers/iio/accel/dmard06.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- linux-5.19.orig/drivers/iio/accel/dmard06.c 2022-08-25 14:19:11.742351430 +0200
+++ linux-5.19/drivers/iio/accel/dmard06.c 2022-08-25 14:20:13.505276596 +0200
@@ -209,7 +209,7 @@ static const struct i2c_device_id dmard0
};
MODULE_DEVICE_TABLE(i2c, dmard06_id);
-static const struct of_device_id dmard06_of_match[] = {
+static const struct of_device_id __maybe_unused dmard06_of_match[] = {
{ .compatible = "domintech,dmard05" },
{ .compatible = "domintech,dmard06" },
{ .compatible = "domintech,dmard07" },
@@ -222,7 +222,7 @@ static struct i2c_driver dmard06_driver
.id_table = dmard06_id,
.driver = {
.name = DMARD06_DRV_NAME,
- .of_match_table = dmard06_of_match,
+ .of_match_table = of_match_ptr(dmard06_of_match),
.pm = pm_sleep_ptr(&dmard06_pm_ops),
},
};
--
Jean Delvare
SUSE L3 Support
next reply other threads:[~2022-08-25 12:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-25 12:40 Jean Delvare [this message]
2022-08-25 20:12 ` [PATCH] iio:accel:dmard06: Optimize when CONFIG_OF isn't set Andy Shevchenko
2022-08-26 10:46 ` Jean Delvare
2022-08-26 15:18 ` Andy Shevchenko
2022-08-26 16:06 ` Jean Delvare
2022-08-26 16:10 ` Andy Shevchenko
2022-08-28 16:41 ` 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=20220825144012.24a33bb0@endymion.delvare \
--to=jdelvare@suse.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