[PATCH 1/1] marvell: irqchip: pic: change driver initcall to arch

kostap at marvell.com kostap at marvell.com
Tue Dec 22 07:21:51 EST 2020


From: Stefan Chulski <stefanc at marvell.com>

Patch solves the PMU driver probe error.
PMU driver depends on irqchip pic driver, so it should probe
after irqchip pic driver.
Initcall order changed from device to arch.

Signed-off-by: Stefan Chulski <stefanc at marvell.com>
Signed-off-by: Konstantin Porotchkin <kostap at marvell.com>
---
 drivers/irqchip/irq-mvebu-pic.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mvebu-pic.c b/drivers/irqchip/irq-mvebu-pic.c
index eec63951129a..eca1a6edf49c 100644
--- a/drivers/irqchip/irq-mvebu-pic.c
+++ b/drivers/irqchip/irq-mvebu-pic.c
@@ -188,7 +188,19 @@ static struct platform_driver mvebu_pic_driver = {
 		.of_match_table = mvebu_pic_of_match,
 	},
 };
-module_platform_driver(mvebu_pic_driver);
+
+static int __init mvebu_pic_driver_init(void)
+{
+	return platform_driver_register(&mvebu_pic_driver);
+}
+
+static void __exit mvebu_pic_driver_exit(void)
+{
+	return platform_driver_unregister(&mvebu_pic_driver);
+}
+
+arch_initcall(mvebu_pic_driver_init)
+module_exit(mvebu_pic_driver_exit)
 
 MODULE_AUTHOR("Yehuda Yitschak <yehuday at marvell.com>");
 MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni at free-electrons.com>");
-- 
2.17.1




More information about the linux-arm-kernel mailing list