>
> Regarding zorro bus drivers - bus_register is called unconditionally
> from a core initcall for the Zorro bus code.
OK. NuBus should probably do the same then. Something like the patch below
(instead of the one I sent earlier).
I don't understand why zorro and others call bus_register() through
postcore_initcall() instead of arch_initcall() or subsys_initcall().
Anyway, this patch follows the same pattern.
diff --git a/drivers/nubus/bus.c b/drivers/nubus/bus.c
index d306c348c857..27ca9f1a281b 100644
--- a/drivers/nubus/bus.c
+++ b/drivers/nubus/bus.c
@@ -63,7 +63,7 @@ static struct device nubus_parent = {
.init_name = "nubus",
};
-int __init nubus_bus_register(void)
+static int __init nubus_bus_register(void)
{
int err;
@@ -78,6 +78,7 @@ int __init nubus_bus_register(void)
device_unregister(&nubus_parent);
return err;
}
+postcore_initcall(nubus_bus_register);
static void nubus_device_release(struct device *dev)
{
diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c
index 4621ff98138c..f6bab483f4cb 100644
--- a/drivers/nubus/nubus.c
+++ b/drivers/nubus/nubus.c
@@ -869,15 +869,10 @@ static void __init nubus_scan_bus(void)
static int __init nubus_init(void)
{
- int err;
-
if (!MACH_IS_MAC)
return 0;
nubus_proc_init();
- err = nubus_bus_register();
- if (err)
- return err;
nubus_scan_bus();
return 0;
}
diff --git a/include/linux/nubus.h b/include/linux/nubus.h
index 6e8200215321..f01e7f4bcff8 100644
--- a/include/linux/nubus.h
+++ b/include/linux/nubus.h
@@ -163,7 +163,6 @@ void nubus_seq_write_rsrc_mem(struct seq_file *m,
unsigned char *nubus_dirptr(const struct nubus_dirent *nd);
/* Declarations relating to driver model objects */
-int nubus_bus_register(void);
int nubus_device_register(struct nubus_board *board);
int nubus_driver_register(struct nubus_driver *ndrv);
void nubus_driver_unregister(struct nubus_driver *ndrv);
--
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html