Skip to contentSkip to conversation

mmc: meson-gx: drop of_match_ptr from of_device_id table

PATCH In review Krzysztof Kozlowski 3 participants 3 messages Nov 3, 2020 – Nov 5, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mmc: meson-gx: drop of_match_ptr from of_device_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 is not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/mmc/host/meson-gx-mmc.c:1252:34: warning:
‘meson_mmc_of_match’ defined but not used [-Wunused-const-variable=]

---
 drivers/mmc/host/meson-gx-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/meson-gx-mmc.c +1 -1
index 4ec41579940a..13f6a2c0ed04 100644
@@ -1265,7 +1265,7 @@ static struct platform_driver meson_mmc_driver = {
 	.driver		= {
 		.name = DRIVER_NAME,
 		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
-		.of_match_table = of_match_ptr(meson_mmc_of_match),
+		.of_match_table = meson_mmc_of_match,
 	},
 };
 
Signature · 1 line
2.25.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Krzysztof Kozlowski

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 is not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/mmc/host/meson-gx-mmc.c:1252:34: warning:
‘meson_mmc_of_match’ defined but not used [-Wunused-const-variable=]

Thanks for the fix.

Kevin

#2 lore raw
In reply to Krzysztof Kozlowski
Quoted 11 lines · Krzysztof Kozlowski

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 is not relevant here). This fixes compile warning (!CONFIG_OF && !CONFIG_MODULES):

drivers/mmc/host/meson-gx-mmc.c:1252:34: warning:
‘meson_mmc_of_match’ defined but not used [-Wunused-const-variable=]

Applied for next, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/meson-gx-mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/meson-gx-mmc.c +1 -2
index 4ec41579940a..13f6a2c0ed04 100644
@@ -1265,7 +1265,7 @@ static struct platform_driver meson_mmc_driver = {
        .driver         = {
                .name = DRIVER_NAME,
                .probe_type = PROBE_PREFER_ASYNCHRONOUS,
-               .of_match_table = of_match_ptr(meson_mmc_of_match),
+               .of_match_table = meson_mmc_of_match,
        },
 };
 
--

2.25.1