lkml.org 
[lkml]   [2022]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] iio:accel:dmard06: Optimize when CONFIG_OF isn't set
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

\
 
 \ /
  Last update: 2022-08-25 14:41    [W:0.061 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site