linux-stable/include
Finn Thain bdeeed0988 nubus: Call bus_register unconditionally
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: 7f86c765a6 ("nubus: Add support for the driver model")
Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-14 16:27:08 +02:00
..
acpi xen: fixes for 4.17-rc1 2018-04-12 11:04:35 -07:00
asm-generic earlycon: Use a pointer table to fix __earlycon_table stride 2018-04-23 10:06:59 +02:00
clocksource
crypto
drm drm: Fix HDCP downstream dev count read 2018-04-16 12:10:48 -04:00
dt-bindings The large diff this time around is from the addition of a new clk driver 2018-04-13 15:51:06 -07:00
keys
kvm arm/arm64: KVM: Add PSCI version selection API 2018-04-20 16:32:23 +01:00
linux nubus: Call bus_register unconditionally 2018-05-14 16:27:08 +02:00
math-emu
media media updates for v4.17-rc1 2018-04-10 10:10:30 -07:00
memory
misc
net net: sched: ife: handle malformed tlv length 2018-04-22 21:12:00 -04:00
pcmcia
ras
rdma Merge candidates for 4.17 merge window 2018-04-06 17:35:43 -07:00
scsi scsi: core: remove reference to scsi_show_extd_sense() 2018-04-18 23:37:39 -04:00
soc soc: bcm2835: Make !RASPBERRYPI_FIRMWARE dummies return failure 2018-04-16 15:15:23 -07:00
sound soundwire streaming 2018-05-13 11:53:18 +02:00
target
trace Following tracing fixes: 2018-04-26 16:22:47 -07:00
uapi Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2018-04-29 09:03:25 -07:00
video
xen xen/sndif: Sync up with the canonical definition in Xen 2018-04-17 08:26:33 -04:00