2023-03-12 13:17:25

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 1/4] Input: st-keyscan: drop of_match_ptr for ID table

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here). This
also fixes !CONFIG_OF error:

drivers/input/keyboard/st-keyscan.c:251:34: error: ‘keyscan_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/input/keyboard/st-keyscan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c
index b6e83324f97a..0d27324af809 100644
--- a/drivers/input/keyboard/st-keyscan.c
+++ b/drivers/input/keyboard/st-keyscan.c
@@ -259,7 +259,7 @@ static struct platform_driver keyscan_device_driver = {
.driver = {
.name = "st-keyscan",
.pm = pm_sleep_ptr(&keyscan_dev_pm_ops),
- .of_match_table = of_match_ptr(keyscan_of_match),
+ .of_match_table = keyscan_of_match,
}
};

--
2.34.1



2023-03-12 13:17:29

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 3/4] Input: sun4i-ts: drop of_match_ptr for ID table

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here). This
also fixes !CONFIG_OF error:

drivers/input/touchscreen/sun4i-ts.c:392:34: error: ‘sun4i_ts_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/input/touchscreen/sun4i-ts.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/sun4i-ts.c b/drivers/input/touchscreen/sun4i-ts.c
index 1117fba30020..577c75c83e25 100644
--- a/drivers/input/touchscreen/sun4i-ts.c
+++ b/drivers/input/touchscreen/sun4i-ts.c
@@ -400,7 +400,7 @@ MODULE_DEVICE_TABLE(of, sun4i_ts_of_match);
static struct platform_driver sun4i_ts_driver = {
.driver = {
.name = "sun4i-ts",
- .of_match_table = of_match_ptr(sun4i_ts_of_match),
+ .of_match_table = sun4i_ts_of_match,
},
.probe = sun4i_ts_probe,
.remove = sun4i_ts_remove,
--
2.34.1


2023-03-12 13:17:32

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 2/4] Input: tm2-touchkey: drop of_match_ptr for ID table

The driver will match mostly by DT table (even thought there is regular
ID table) so there is little benefit in of_match_ptr (this also allows
ACPI matching via PRP0001, even though it might not be relevant here).
This also fixes !CONFIG_OF error:

drivers/input/keyboard/tm2-touchkey.c:335:34: error: ‘tm2_touchkey_of_match’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/input/keyboard/tm2-touchkey.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c
index 6627e65f06e5..4e20571cb4c3 100644
--- a/drivers/input/keyboard/tm2-touchkey.c
+++ b/drivers/input/keyboard/tm2-touchkey.c
@@ -354,7 +354,7 @@ static struct i2c_driver tm2_touchkey_driver = {
.driver = {
.name = TM2_TOUCHKEY_DEV_NAME,
.pm = pm_sleep_ptr(&tm2_touchkey_pm_ops),
- .of_match_table = of_match_ptr(tm2_touchkey_of_match),
+ .of_match_table = tm2_touchkey_of_match,
},
.probe_new = tm2_touchkey_probe,
.id_table = tm2_touchkey_id_table,
--
2.34.1


2023-03-12 13:17:36

by Krzysztof Kozlowski

[permalink] [raw]
Subject: [PATCH 4/4] Input: bcm_iproc_tsc: drop of_match_ptr for ID table

The driver can match only via the DT table so the table should be always
used and the of_match_ptr does not have any sense (this also allows ACPI
matching via PRP0001, even though it might not be relevant here). This
also fixes !CONFIG_OF error:

Signed-off-by: Krzysztof Kozlowski <[email protected]>
---
drivers/input/touchscreen/bcm_iproc_tsc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/input/touchscreen/bcm_iproc_tsc.c b/drivers/input/touchscreen/bcm_iproc_tsc.c
index 35e2fe9911a4..9c84235327bf 100644
--- a/drivers/input/touchscreen/bcm_iproc_tsc.c
+++ b/drivers/input/touchscreen/bcm_iproc_tsc.c
@@ -511,7 +511,7 @@ static struct platform_driver iproc_ts_driver = {
.probe = iproc_ts_probe,
.driver = {
.name = IPROC_TS_NAME,
- .of_match_table = of_match_ptr(iproc_ts_of_match),
+ .of_match_table = iproc_ts_of_match,
},
};

--
2.34.1


2023-03-14 20:05:14

by Jernej Škrabec

[permalink] [raw]
Subject: Re: [PATCH 3/4] Input: sun4i-ts: drop of_match_ptr for ID table

Dne nedelja, 12. marec 2023 ob 14:15:13 CET je Krzysztof Kozlowski napisal(a):
> The driver can match only via the DT table so the table should be always
> used and the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it might not be relevant here). This
> also fixes !CONFIG_OF error:
>
> drivers/input/touchscreen/sun4i-ts.c:392:34: error: ‘sun4i_ts_of_match’
> defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>
> ---
> drivers/input/touchscreen/sun4i-ts.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Acked-by: Jernej Skrabec <[email protected]>

Best regards,
Jernej

> diff --git a/drivers/input/touchscreen/sun4i-ts.c
> b/drivers/input/touchscreen/sun4i-ts.c index 1117fba30020..577c75c83e25
> 100644
> --- a/drivers/input/touchscreen/sun4i-ts.c
> +++ b/drivers/input/touchscreen/sun4i-ts.c
> @@ -400,7 +400,7 @@ MODULE_DEVICE_TABLE(of, sun4i_ts_of_match);
> static struct platform_driver sun4i_ts_driver = {
> .driver = {
> .name = "sun4i-ts",
> - .of_match_table = of_match_ptr(sun4i_ts_of_match),
> + .of_match_table = sun4i_ts_of_match,
> },
> .probe = sun4i_ts_probe,
> .remove = sun4i_ts_remove,





2023-03-17 11:20:24

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 1/4] Input: st-keyscan: drop of_match_ptr for ID table

On Sun, Mar 12, 2023 at 02:15:11PM +0100, Krzysztof Kozlowski wrote:
> The driver can match only via the DT table so the table should be always
> used and the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it might not be relevant here). This
> also fixes !CONFIG_OF error:
>
> drivers/input/keyboard/st-keyscan.c:251:34: error: ‘keyscan_of_match’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Applied, thank you.

--
Dmitry

2023-03-17 11:20:44

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 2/4] Input: tm2-touchkey: drop of_match_ptr for ID table

On Sun, Mar 12, 2023 at 02:15:12PM +0100, Krzysztof Kozlowski wrote:
> The driver will match mostly by DT table (even thought there is regular
> ID table) so there is little benefit in of_match_ptr (this also allows
> ACPI matching via PRP0001, even though it might not be relevant here).
> This also fixes !CONFIG_OF error:
>
> drivers/input/keyboard/tm2-touchkey.c:335:34: error: ‘tm2_touchkey_of_match’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Applied, thank you.

--
Dmitry

2023-03-17 11:21:01

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 3/4] Input: sun4i-ts: drop of_match_ptr for ID table

On Sun, Mar 12, 2023 at 02:15:13PM +0100, Krzysztof Kozlowski wrote:
> The driver can match only via the DT table so the table should be always
> used and the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it might not be relevant here). This
> also fixes !CONFIG_OF error:
>
> drivers/input/touchscreen/sun4i-ts.c:392:34: error: ‘sun4i_ts_of_match’ defined but not used [-Werror=unused-const-variable=]
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Applied, thank you.

--
Dmitry

2023-03-17 11:21:14

by Dmitry Torokhov

[permalink] [raw]
Subject: Re: [PATCH 4/4] Input: bcm_iproc_tsc: drop of_match_ptr for ID table

On Sun, Mar 12, 2023 at 02:15:14PM +0100, Krzysztof Kozlowski wrote:
> The driver can match only via the DT table so the table should be always
> used and the of_match_ptr does not have any sense (this also allows ACPI
> matching via PRP0001, even though it might not be relevant here). This
> also fixes !CONFIG_OF error:
>
> Signed-off-by: Krzysztof Kozlowski <[email protected]>

Applied, thank you.

--
Dmitry