Skip to content

Commit b4badee

Browse files
henryZedtor
authored andcommitted
Input: imagis - fix warning regarding 'imagis_3038_data' being unused
Fix the following compilation warnings: drivers/input/touchscreen/imagis.c:422:39: warning: ‘imagis_3038c_data’ defined but not used [-Wunused-const-variable=] 422 | static const struct imagis_properties imagis_3038c_data = { drivers/input/touchscreen/imagis.c:415:39: warning: ‘imagis_3038b_data’ defined but not used [-Wunused-const-variable=] 415 | static const struct imagis_properties imagis_3038b_data = { drivers/input/touchscreen/imagis.c:407:39: warning: ‘imagis_3038_data’ defined but not used [-Wunused-const-variable=] 407 | static const struct imagis_properties imagis_3038_data = { drivers/input/touchscreen/imagis.c:398:39: warning: ‘imagis_3032c_data’ defined but not used [-Wunused-const-variable=] 398 | static const struct imagis_properties imagis_3032c_data = { Only define the variables 'imagis_303*_data' when the CONFIG_OF is enabled. Fixes: 1e48ee9 ("Input: imagis - add supports for Imagis IST3038") Signed-off-by: Zeng Heng <[email protected]> Acked-by: Markuss Broks <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
1 parent 92a2284 commit b4badee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/input/touchscreen/imagis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ static int imagis_resume(struct device *dev)
395395

396396
static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume);
397397

398+
#ifdef CONFIG_OF
398399
static const struct imagis_properties imagis_3032c_data = {
399400
.interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE,
400401
.touch_coord_cmd = IST3038C_REG_TOUCH_COORD,
@@ -427,7 +428,6 @@ static const struct imagis_properties imagis_3038c_data = {
427428
.protocol_b = true,
428429
};
429430

430-
#ifdef CONFIG_OF
431431
static const struct of_device_id imagis_of_match[] = {
432432
{ .compatible = "imagis,ist3032c", .data = &imagis_3032c_data },
433433
{ .compatible = "imagis,ist3038", .data = &imagis_3038_data },

0 commit comments

Comments
 (0)