Messages in this thread | | | From | Geert Uytterhoeven <> | Date | Wed, 9 May 2018 09:31:36 +0200 | Subject | Re: [PATCH v2] nubus: Call bus_register unconditionally |
| |
On Wed, May 9, 2018 at 3:04 AM, Finn Thain <fthain@telegraphics.com.au> wrote: > 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: 7f86c765a6a2 ("nubus: Add support for the driver model") > Signed-off-by: Finn Thain <fthain@telegraphics.com.au>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Gr{oetje,eeting}s,
Geert
-- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds
| |