mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08:00
bdeeed0988
Loading a NuBus driver module on a non-NuBus machine triggers the
BUG_ON(!drv->bus->p) in driver_register(), because bus_register() was
not called, because it is conditional on MACH_IS_MAC.
Fix the crash by calling bus_register() unconditionally. Call it from
a postcore_initcall(), like other busses do.
Hence, the bus type is available for device_register(), which happens
in a subsys initcall, and for driver_register(), which happens in a
device or module initcall.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reported-by: Michael Schmitz <schmitzmic@gmail.com>
Tested-by: Stan Johnson <userm57@yahoo.com>
Fixes:
|
||
---|---|---|
.. | ||
bus.c | ||
Makefile | ||
nubus.c | ||
proc.c |