[RFC] Fix BUG splat during nubus_driver_register()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please consider the patch below. The approach here is to always register 
the bus type, regardless of platform.

An alternative approach would be to add another MACH_IS_MAC() test to 
nubus_driver_register().

Arguably this patch should add a MACH_IS_MAC() test in nubus_proc_init().

BTW, does zorro_register_driver() cause the same failure? What happens if 
you do 'modprobe zorro7xx' on Aranym?

diff --git a/drivers/nubus/nubus.c b/drivers/nubus/nubus.c
index 4621ff98138c..5152dbdb0707 100644
--- a/drivers/nubus/nubus.c
+++ b/drivers/nubus/nubus.c
@@ -861,6 +861,9 @@ static void __init nubus_scan_bus(void)
 {
 	int slot;
 
+	if (!MACH_IS_MAC)
+		return 0;
+
 	pr_info("NuBus: Scanning NuBus slots.\n");
 	for (slot = 9; slot < 15; slot++) {
 		nubus_probe_slot(slot);
@@ -871,9 +874,6 @@ static int __init nubus_init(void)
 {
 	int err;
 
-	if (!MACH_IS_MAC)
-		return 0;
-
 	nubus_proc_init();
 	err = nubus_bus_register();
 	if (err)

-- 
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux