Skip to contentSkip to conversation

gpio: sim: actually use the OF module table

PATCH In review Bartosz Golaszewski 2 participants 2 messages Mar 30, 2021 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: sim: actually use the OF module table

From: Bartosz Golaszewski <[email protected]>

We don't assign the of_device_id table to the platform driver resulting in the following build warning:

Quoted 1 line
Quoted 1 line

drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' [-Wunused-const-variable]

static const struct of_device_id gpio_sim_of_match[] = {

This fixes it.

---
 drivers/gpio/gpio-sim.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-sim.c +1 -0
index a1807f518837..ea17289a869c 100644
@@ -394,6 +394,7 @@ MODULE_DEVICE_TABLE(of, gpio_sim_of_match);
 static struct platform_driver gpio_sim_driver = {
 	.driver = {
 		.name = "gpio-sim",
+		.of_match_table = gpio_sim_of_match,
 	},
 	.probe = gpio_sim_probe,
 };
Signature · 1 line
2.30.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

We don't assign the of_device_id table to the platform driver resulting in the following build warning:

Quoted 1 line
Quoted 1 line

drivers/gpio/gpio-sim.c:388:34: warning: unused variable 'gpio_sim_of_match' [-Wunused-const-variable]

static const struct of_device_id gpio_sim_of_match[] = {

This fixes it.

Quoted 21 lines
---
 drivers/gpio/gpio-sim.c | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpio-sim.c +1 -0
index a1807f518837..ea17289a869c 100644
@@ -394,6 +394,7 @@ MODULE_DEVICE_TABLE(of, gpio_sim_of_match);
 static struct platform_driver gpio_sim_driver = {
 	.driver = {
 		.name = "gpio-sim",
+		.of_match_table = gpio_sim_of_match,
 	},
 	.probe = gpio_sim_probe,
 };
Signature · 1 line
2.30.1
Signature · 2 lines
With Best Regards,
Andy Shevchenko