Skip to contentSkip to conversation

hi846: Drop of_match_ptr() from OF device ID list

PATCH In review Sakari Ailus 2 participants 2 messages Nov 5, 2021

Subsystems (3)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

PATCH 1/1 hi846: Drop of_match_ptr() from OF device ID list

The compatible strings can also be used on ACPI so drop of_match_ptr() macro. This also fixes a compiler warning when the driver is compiled without OF support.

---
 drivers/media/i2c/hi846.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/hi846.c +1 -1
index 822ce3021fde..cf61c22f6125 100644
@@ -2176,7 +2176,7 @@ static struct i2c_driver hi846_i2c_driver = {
 	.driver = {
 		.name = "hi846",
 		.pm = &hi846_pm_ops,
-		.of_match_table = of_match_ptr(hi846_of_match),
+		.of_match_table = hi846_of_match,
 	},
 	.probe_new = hi846_probe,
 	.remove = hi846_remove,
Signature · 1 line
2.30.2
#1 lore raw

Am 5. November 2021 09:22:50 MEZ schrieb Sakari Ailus <[email protected]>:

Quoted 5 lines

The compatible strings can also be used on ACPI so drop of_match_ptr() macro. This also fixes a compiler warning when the driver is compiled without OF support.

but this is also part of https://lore.kernel.org/linux-media/[email protected]/ just fyi

Quoted 17 lines

---
drivers/media/i2c/hi846.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/hi846.c +1 -1
index 822ce3021fde..cf61c22f6125 100644
@@ -2176,7 +2176,7 @@ static struct i2c_driver hi846_i2c_driver = {
 	.driver = {
 		.name = "hi846",
 		.pm = &hi846_pm_ops,
-		.of_match_table = of_match_ptr(hi846_of_match),
+		.of_match_table = hi846_of_match,
 	},
 	.probe_new = hi846_probe,
 	.remove = hi846_remove,