aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron Sierra <asierra@xes-inc.com>2013-12-09 10:54:42 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-17 20:06:19 -0500
commitc326cc023e40ef741751a084b72796947bd37a66 (patch)
treee3a744b70fc06f323369033ae7014eb3476188d1
parente56b1401056288a725d50942ef300dcbed5e519a (diff)
vme: Convert VME core to register as a subsystem
Previously, VME bridge support was treated as any other driver (using module_init() macro), but if VME bridge and vme_user (staging) drivers were compiled into the kernel, then vme_user would attempt to register itself before the VME core support had been loaded. This would result in a kernel panic. The load order of these built-in drivers is based on the order in which drivers/staging/vme and driver/vme are compiled. This patch changes the VME core driver to use the subsys_initcall() macro which ensures that it is loaded before all other VME drivers regardless of the order in which they are compiled. Tested-by: Aaron Sierra <asierra@xes-inc.com> Signed-off-by: Martyn Welch <martyn.welch@ge.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/vme/Kconfig2
-rw-r--r--drivers/vme/vme.c6
2 files changed, 2 insertions, 6 deletions
diff --git a/drivers/vme/Kconfig b/drivers/vme/Kconfig
index c5c22465a805..a6a6f9559119 100644
--- a/drivers/vme/Kconfig
+++ b/drivers/vme/Kconfig
@@ -3,7 +3,7 @@
3# 3#
4 4
5menuconfig VME_BUS 5menuconfig VME_BUS
6 tristate "VME bridge support" 6 bool "VME bridge support"
7 depends on PCI 7 depends on PCI
8 ---help--- 8 ---help---
9 If you say Y here you get support for the VME bridge Framework. 9 If you say Y here you get support for the VME bridge Framework.
diff --git a/drivers/vme/vme.c b/drivers/vme/vme.c
index 96562c9a8b1b..7516030037a1 100644
--- a/drivers/vme/vme.c
+++ b/drivers/vme/vme.c
@@ -1525,9 +1525,5 @@ static void __exit vme_exit(void)
1525 bus_unregister(&vme_bus_type); 1525 bus_unregister(&vme_bus_type);
1526} 1526}
1527 1527
1528MODULE_DESCRIPTION("VME bridge driver framework"); 1528subsys_initcall(vme_init);
1529MODULE_AUTHOR("Martyn Welch <martyn.welch@ge.com");
1530MODULE_LICENSE("GPL");
1531
1532module_init(vme_init);
1533module_exit(vme_exit); 1529module_exit(vme_exit);