From 0d484d47933d7c0287a0379fdc3079b6f5cfba69 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sat, 22 Apr 2000 15:03:08 +0000 Subject: [PATCH] Make sure the driver's ops table has been initialised before calling static methods. --- sys/kern/subr_bus.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index 01b967654d32..27edde92c008 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -1842,6 +1842,11 @@ bus_generic_driver_added(device_t dev, driver_t *driver) { device_t child; + /* + * Make sure the class has a valid ops table. + */ + kobj_class_compile((kobj_class_t) driver); + DEVICE_IDENTIFY(driver, dev); for (child = TAILQ_FIRST(&dev->children); child; child = TAILQ_NEXT(child, link))