[PATCH] gpio: pl061: Fix driver registration

Sascha Hauer s.hauer at pengutronix.de
Mon Mar 22 11:31:49 GMT 2021


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")
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/gpio/gpio-pl061.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/drivers/gpio/gpio-pl061.c b/drivers/gpio/gpio-pl061.c
index c17c265440..f34aba9da9 100644
--- a/drivers/gpio/gpio-pl061.c
+++ b/drivers/gpio/gpio-pl061.c
@@ -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 <baruch at tkos.co.il>");
 MODULE_DESCRIPTION("PL061 GPIO driver");
-- 
2.29.2




More information about the barebox mailing list