diff --git a/src/libs/compat/freebsd_network/compat.c b/src/libs/compat/freebsd_network/compat.c index 0f92586569..5e07396d82 100644 --- a/src/libs/compat/freebsd_network/compat.c +++ b/src/libs/compat/freebsd_network/compat.c @@ -294,7 +294,9 @@ device_set_driver(device_t dev, driver_t *driver) for (i = 0; driver->methods[i].name != NULL; i++) { device_method_t *mth = &driver->methods[i]; - if (strcmp(mth->name, "device_probe") == 0) + if (strcmp(mth->name, "device_register") == 0) + dev->methods.device_register = (void *)mth->method; + else if (strcmp(mth->name, "device_probe") == 0) dev->methods.probe = (void *)mth->method; else if (strcmp(mth->name, "device_attach") == 0) dev->methods.attach = (void *)mth->method; diff --git a/src/libs/compat/freebsd_network/shared.h b/src/libs/compat/freebsd_network/shared.h index 1d49edd469..8544a8e7b7 100644 --- a/src/libs/compat/freebsd_network/shared.h +++ b/src/libs/compat/freebsd_network/shared.h @@ -34,6 +34,7 @@ struct device { void *ivars; struct { + void* (*device_register)(device_t dev); int (*probe)(device_t dev); int (*attach)(device_t dev); int (*detach)(device_t dev);