Skip to contentSkip to conversation

gpio: pl061: Fix driver registration

PATCH New Sascha Hauer 1 participant 1 message Mar 22, 2021 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpio: pl061: Fix driver registration

77e74ddca1 changes drivers to use coredevice_platform_driver() instead of open coded initcall/driver registration. This is wrong for the pl061 driver as this is an amba driver. Revert 77e74ddca1 for this file.

Fixes 77e74ddca1 ("treewide: Use driver macro")
---
 drivers/gpio/gpio-pl061.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpio/gpio-pl061.c +5 -1
index c17c265440..f34aba9da9 100644
@@ -147,7 +147,11 @@ static struct amba_driver pl061_gpio_driver = {
 	.probe		= pl061_probe,
 };
 
-coredevice_platform_driver(pl061_gpio_driver);
+static int __init pl061_gpio_init(void)
+{
+	return amba_driver_register(&pl061_gpio_driver);
+}
+coredevice_initcall(pl061_gpio_init);
 
 MODULE_AUTHOR("Baruch Siach <[email protected]>");
 MODULE_DESCRIPTION("PL061 GPIO driver");
Signature · 7 lines
2.29.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox