mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-19 20:12:32 +00:00
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: 1e48ee99f603 ("Input: imagis - add supports for Imagis IST3038") Signed-off-by: Zeng Heng <zengheng4@huawei.com> Acked-by: Markuss Broks <markuss.broks@gmail.com> Link: https://lore.kernel.org/r/20241023094831.1680214-1-zengheng4@huawei.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
92a22842ec
commit
b4badee88c
@ -395,6 +395,7 @@ static int imagis_resume(struct device *dev)
|
||||
|
||||
static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume);
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct imagis_properties imagis_3032c_data = {
|
||||
.interrupt_msg_cmd = IST3038C_REG_INTR_MESSAGE,
|
||||
.touch_coord_cmd = IST3038C_REG_TOUCH_COORD,
|
||||
@ -427,7 +428,6 @@ static const struct imagis_properties imagis_3038c_data = {
|
||||
.protocol_b = true,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_OF
|
||||
static const struct of_device_id imagis_of_match[] = {
|
||||
{ .compatible = "imagis,ist3032c", .data = &imagis_3032c_data },
|
||||
{ .compatible = "imagis,ist3038", .data = &imagis_3038_data },
|
||||
|
Loading…
x
Reference in New Issue
Block a user