atheroswifi: try at fixing #8351
* ath introduced an inconsistency between driver module name and driver_t name which the compat layer uses to lookup driver symbol * we now use ath_pci instead of ath as driver_t name member. * trace a message when a symbol can't be found during driver module search.
This commit is contained in:
parent
65c85d310d
commit
15f3f679cb
@ -245,7 +245,11 @@ static device_method_t ath_pci_methods[] = {
|
||||
{ 0,0 }
|
||||
};
|
||||
static driver_t ath_pci_driver = {
|
||||
#ifdef __HAIKU__
|
||||
"ath_pci",
|
||||
#else
|
||||
"ath",
|
||||
#endif
|
||||
ath_pci_methods,
|
||||
sizeof (struct ath_pci_softc)
|
||||
};
|
||||
|
@ -323,8 +323,10 @@ device_add_child(device_t parent, const char *name, int unit)
|
||||
snprintf(symbol, sizeof(symbol), "__fbsd_%s_%s", name,
|
||||
parent->driver->name);
|
||||
if (get_image_symbol(find_own_image(), symbol, B_SYMBOL_TYPE_DATA,
|
||||
(void **)&driver) == B_OK)
|
||||
(void **)&driver) == B_OK) {
|
||||
child = new_device(*driver);
|
||||
} else
|
||||
device_printf(parent, "couldn't find symbol %s\n", symbol);
|
||||
}
|
||||
} else
|
||||
child = new_device(NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user