lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1376685563-1053-2-git-send-email-treding@nvidia.com>
Date:	Fri, 16 Aug 2013 22:39:20 +0200
From:	Thierry Reding <thierry.reding@...il.com>
To:	Grant Likely <grant.likely@...aro.org>
Cc:	Rob Herring <rob.herring@...xeda.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Stephen Warren <swarren@...dotorg.org>,
	Hiroshi Doyu <hdoyu@...dia.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [RFC 1/4] driver core: Register SoC bus after platform bus

Instead of registering the SoC bus as a core initcall, call it directly
from driver_init() to make it explicit when it is called. This is done
in preparation for early device registration support.

Signed-off-by: Thierry Reding <treding@...dia.com>
---
 drivers/base/base.h |  5 +++++
 drivers/base/init.c |  1 +
 drivers/base/soc.c  | 11 +----------
 3 files changed, 7 insertions(+), 10 deletions(-)

diff --git a/drivers/base/base.h b/drivers/base/base.h
index 2cbc677..77e0722 100644
--- a/drivers/base/base.h
+++ b/drivers/base/base.h
@@ -99,6 +99,11 @@ extern int hypervisor_init(void);
 static inline int hypervisor_init(void) { return 0; }
 #endif
 extern int platform_bus_init(void);
+#ifdef CONFIG_SOC_BUS
+extern int soc_bus_init(void);
+#else
+static inline int soc_bus_init(void) { return 0; }
+#endif
 extern void cpu_dev_init(void);
 
 struct kobject *virtual_device_parent(struct device *dev);
diff --git a/drivers/base/init.c b/drivers/base/init.c
index c16f0b8..a4c4090 100644
--- a/drivers/base/init.c
+++ b/drivers/base/init.c
@@ -31,6 +31,7 @@ void __init driver_init(void)
 	 * core core pieces.
 	 */
 	platform_bus_init();
+	soc_bus_init();
 	cpu_dev_init();
 	memory_dev_init();
 }
diff --git a/drivers/base/soc.c b/drivers/base/soc.c
index 72b5e72..ea116f4 100644
--- a/drivers/base/soc.c
+++ b/drivers/base/soc.c
@@ -166,16 +166,7 @@ void soc_device_unregister(struct soc_device *soc_dev)
 	device_unregister(&soc_dev->dev);
 }
 
-static int __init soc_bus_register(void)
+int __init soc_bus_init(void)
 {
 	return bus_register(&soc_bus_type);
 }
-core_initcall(soc_bus_register);
-
-static void __exit soc_bus_unregister(void)
-{
-	ida_destroy(&soc_ida);
-
-	bus_unregister(&soc_bus_type);
-}
-module_exit(soc_bus_unregister);
-- 
1.8.3.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ