From e03a933dd0449e5fa7059995658c21532fd6c4ea Mon Sep 17 00:00:00 2001 From: Patrick Mochel Date: Tue, 5 Feb 2002 00:36:51 -0800 Subject: [PATCH] [PATCH] driver model updates (1/5) Patch 1: Make device_driver_init() an initcall. It declares it as subsys_initcall and removes the explicit call from init/main.c::do_basic_setup(). --- drivers/base/core.c | 5 +++-- include/linux/device.h | 3 --- init/main.c | 6 ------ 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/drivers/base/core.c b/drivers/base/core.c index 83c81fbd5d1a..8c3caf2f883e 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -183,7 +183,7 @@ static int __init device_init_root(void) return iobus_register(&device_root); } -int __init device_driver_init(void) +static int __init device_driver_init(void) { int error = 0; @@ -208,8 +208,9 @@ int __init device_driver_init(void) return error; } +subsys_initcall(device_driver_init); + EXPORT_SYMBOL(device_register); EXPORT_SYMBOL(put_device); EXPORT_SYMBOL(iobus_register); EXPORT_SYMBOL(put_iobus); -EXPORT_SYMBOL(device_driver_init); diff --git a/include/linux/device.h b/include/linux/device.h index 284b52f5a380..c95ad6738394 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -163,9 +163,6 @@ extern int (*platform_notify)(struct device * dev); extern int (*platform_notify_remove)(struct device * dev); -extern int device_driver_init(void); - - /* device and bus locking helpers. * * FIXME: Is there anything else we need to do? diff --git a/init/main.c b/init/main.c index f4f7ccc42fdb..64f4c2990920 100644 --- a/init/main.c +++ b/init/main.c @@ -31,8 +31,6 @@ #include #include -#include - #if defined(CONFIG_ARCH_S390) #include #include @@ -446,10 +444,6 @@ static void __init do_basic_setup(void) #if defined(CONFIG_ARCH_S390) s390_init_machine_check(); #endif - - /* bring up the device tree */ - device_driver_init(); - /* Networking initialization needs a process context */ sock_init(); -- 2.39.5