Skip to contentSkip to conversation

marvell: irqchip: pic: change driver initcall to arch

PATCH In review [email protected] 2 participants 2 messages Dec 22, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

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

From: Stefan Chulski <[email protected]>

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.

---
 drivers/irqchip/irq-mvebu-pic.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/irqchip/irq-mvebu-pic.c +13 -1
index eec63951129a..eca1a6edf49c 100644
@@ -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 <[email protected]>");
 MODULE_AUTHOR("Thomas Petazzoni <[email protected]>");
Signature · 7 lines
2.17.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw
Quoted 38 lines · On 2020-12-22 12:21, [email protected] wrote:

From: Stefan Chulski <[email protected]>

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.

---
 drivers/irqchip/irq-mvebu-pic.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
drivers/irqchip/irq-mvebu-pic.c +13 -1
index eec63951129a..eca1a6edf49c 100644
@@ -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 <[email protected]>");
 MODULE_AUTHOR("Thomas Petazzoni 
Quoted 1 line

<[email protected]>");

You are trading an implicit dependency for another one, so this patch isn't acceptable, as it is just as likely to break as the current situation.

Furthermore, at least on the system I lying around (8040), the PMU driver is perfectly able to defer its probing until the interrupt becomes available, so I have no idea what problem you are trying to solve.

        M.
Signature · 6 lines
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel