summaryrefslogtreecommitdiffstats
path: root/drivers/nubus/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/nubus/bus.c')
-rw-r--r--drivers/nubus/bus.c19
1 files changed, 7 insertions, 12 deletions
diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c
index d306c348c857..a59b6c4bb5b8 100644
--- a/drivers/nubus/bus.c
+++ b/drivers/nubus/bus.c
@@ -63,20 +63,15 @@ static struct device nubus_parent = {
.init_name = "nubus",
};
-int __init nubus_bus_register(void)
+static int __init nubus_bus_register(void)
{
- int err;
-
- err = device_register(&nubus_parent);
- if (err)
- return err;
-
- err = bus_register(&nubus_bus_type);
- if (!err)
- return 0;
+ return bus_register(&nubus_bus_type);
+}
+postcore_initcall(nubus_bus_register);
- device_unregister(&nubus_parent);
- return err;
+int __init nubus_parent_device_register(void)
+{
+ return device_register(&nubus_parent);
}
static void nubus_device_release(struct device *dev)