[PATCH 29/34] Input: imagis - remove incorrect ifdef checks

From: Arnd Bergmann
Date: Wed Apr 03 2024 - 04:27:39 EST


From: Arnd Bergmann <arnd@xxxxxxxx>

When CONFIG_OF is disabled, three variables become unused:

drivers/input/touchscreen/imagis.c:391:39: error: unused variable 'imagis_3032c_data' [-Werror,-Wunused-const-variable]
drivers/input/touchscreen/imagis.c:399:39: error: unused variable 'imagis_3038b_data' [-Werror,-Wunused-const-variable]
drivers/input/touchscreen/imagis.c:407:39: error: unused variable 'imagis_3038c_data' [-Werror,-Wunused-const-variable]

There is no real point in building this driver without CONFIG_OF,
so just remove the #ifdef checks and just always build this to avoids
the warnings.

Fixes: 10ad7d7a428f ("input/touchscreen: imagis: Add support for Imagis IST3038B")
Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>
---
drivers/input/touchscreen/imagis.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c
index 074dd6c342ec..d09b10f77a19 100644
--- a/drivers/input/touchscreen/imagis.c
+++ b/drivers/input/touchscreen/imagis.c
@@ -411,7 +411,6 @@ static const struct imagis_properties imagis_3038c_data = {
.whoami_val = IST3038C_WHOAMI,
};

-#ifdef CONFIG_OF
static const struct of_device_id imagis_of_match[] = {
{ .compatible = "imagis,ist3032c", .data = &imagis_3032c_data },
{ .compatible = "imagis,ist3038b", .data = &imagis_3038b_data },
@@ -419,13 +418,12 @@ static const struct of_device_id imagis_of_match[] = {
{ },
};
MODULE_DEVICE_TABLE(of, imagis_of_match);
-#endif

static struct i2c_driver imagis_ts_driver = {
.driver = {
.name = "imagis-touchscreen",
.pm = pm_sleep_ptr(&imagis_pm_ops),
- .of_match_table = of_match_ptr(imagis_of_match),
+ .of_match_table = imagis_of_match,
},
.probe = imagis_probe,
};
--
2.39.2