diff mbox series

[1/2] leds: Init leds class earlier

Message ID 20240215142345.6073-2-mariusz.tkaczyk@linux.intel.com
State New
Headers show
Series Native PCIe Enclosure Management | expand

Commit Message

Mariusz Tkaczyk Feb. 15, 2024, 2:23 p.m. UTC
PCI subsystem is registered on subsys_initcall() same as leds class.
NPEM driver will require leds class, there is race possibility.

Register led class on arch_initcall() to avoid it.

Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
---
 drivers/leds/led-class.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/leds/led-class.c b/drivers/leds/led-class.c
index ba1be15cfd8e..4cf99d64958e 100644
--- a/drivers/leds/led-class.c
+++ b/drivers/leds/led-class.c
@@ -675,7 +675,7 @@  static void __exit leds_exit(void)
 	class_unregister(&leds_class);
 }
 
-subsys_initcall(leds_init);
+arch_initcall(leds_init);
 module_exit(leds_exit);
 
 MODULE_AUTHOR("John Lenz, Richard Purdie");