* [PATCH] input/touchscreen: imagis: Fix not used variable 'imagis_3038_data'
@ 2024-10-23 9:48 Zeng Heng
2024-10-23 13:28 ` Markuss Broks
2024-10-23 21:22 ` Dmitry Torokhov
0 siblings, 2 replies; 3+ messages in thread
From: Zeng Heng @ 2024-10-23 9:48 UTC (permalink / raw)
To: raymondhackley, dmitry.torokhov, markuss.broks
Cc: linux-input, bobo.shaobowang, linux-kernel
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>
---
drivers/input/touchscreen/imagis.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c
index aeabf8d057de..abeae9102323 100644
--- a/drivers/input/touchscreen/imagis.c
+++ b/drivers/input/touchscreen/imagis.c
@@ -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 },
--
2.25.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] input/touchscreen: imagis: Fix not used variable 'imagis_3038_data'
2024-10-23 9:48 [PATCH] input/touchscreen: imagis: Fix not used variable 'imagis_3038_data' Zeng Heng
@ 2024-10-23 13:28 ` Markuss Broks
2024-10-23 21:22 ` Dmitry Torokhov
1 sibling, 0 replies; 3+ messages in thread
From: Markuss Broks @ 2024-10-23 13:28 UTC (permalink / raw)
To: Zeng Heng, raymondhackley, dmitry.torokhov
Cc: linux-input, bobo.shaobowang, linux-kernel
Hello,
On 10/23/24 12:48 PM, Zeng Heng wrote:
> 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>
> ---
> drivers/input/touchscreen/imagis.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c
> index aeabf8d057de..abeae9102323 100644
> --- a/drivers/input/touchscreen/imagis.c
> +++ b/drivers/input/touchscreen/imagis.c
> @@ -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 },
Acked-by: Markuss Broks <markuss.broks@gmail.com>
- Markuss
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] input/touchscreen: imagis: Fix not used variable 'imagis_3038_data'
2024-10-23 9:48 [PATCH] input/touchscreen: imagis: Fix not used variable 'imagis_3038_data' Zeng Heng
2024-10-23 13:28 ` Markuss Broks
@ 2024-10-23 21:22 ` Dmitry Torokhov
1 sibling, 0 replies; 3+ messages in thread
From: Dmitry Torokhov @ 2024-10-23 21:22 UTC (permalink / raw)
To: Zeng Heng
Cc: raymondhackley, markuss.broks, linux-input, bobo.shaobowang,
linux-kernel
On Wed, Oct 23, 2024 at 05:48:31PM +0800, Zeng Heng wrote:
> 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>
Applied, thank you.
--
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-10-23 21:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-23 9:48 [PATCH] input/touchscreen: imagis: Fix not used variable 'imagis_3038_data' Zeng Heng
2024-10-23 13:28 ` Markuss Broks
2024-10-23 21:22 ` Dmitry Torokhov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).