LIST_HEAD(nubus_func_rsrcs);
-static struct device nubus_parent = {
- .init_name = "nubus",
-};
+static struct device *nubus_parent;
/* Meaning of "bytelanes":
list_add_tail(&fres->list, &nubus_func_rsrcs);
}
- if (nubus_device_register(&nubus_parent, board))
+ if (nubus_device_register(nubus_parent, board))
put_device(&board->dev);
}
static int __init nubus_init(void)
{
- int err;
-
if (!MACH_IS_MAC)
return 0;
nubus_proc_init();
- err = device_register(&nubus_parent);
- if (err) {
- put_device(&nubus_parent);
- return err;
- }
+
+ nubus_parent = root_device_register("nubus");
+ if (IS_ERR(nubus_parent))
+ return PTR_ERR(nubus_parent);
+
nubus_scan_bus();
+
return 0;
}