summaryrefslogtreecommitdiffstats
path: root/sys/net80211
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2009-10-22 14:53:44 +0000
committerjhb <jhb@FreeBSD.org>2009-10-22 14:53:44 +0000
commite3088a4b83931beff3476dfaa5d471761e0d5219 (patch)
treecd3ade1441074049c4c87b115d5e7afb352a1ad8 /sys/net80211
parentf7d845e3ac12005c7b4ebf43903ca8b62168eb42 (diff)
downloadFreeBSD-src-e3088a4b83931beff3476dfaa5d471761e0d5219.zip
FreeBSD-src-e3088a4b83931beff3476dfaa5d471761e0d5219.tar.gz
Set the devclass_t pointer specified in the DRIVER_MODULE() macro
sooner so it is always valid when a driver's identify routine is called. Previously, new-bus would attempt to create the devclass for a newly loaded driver in two separate places, once in devclass_add_driver(), and again after devclass_add_driver() returned in driver_module_handler(). Only the second lookup attempted to set a device class' parent and set the devclass_t pointer specified in the DRIVER_MODULE() macro. However, by the time it was executed, the driver was already added to existing instances of the parent driver at which point in time the new driver's identify routine would have been invoked. The fix is to merge the two attempts and only create the devclass once in devclass_add_driver() including setting the devclass_t pointer passed to DRIVER_MODULE() before the driver is added to any existing bus devices. Reported by: avg Reviewed by: imp MFC after: 2 weeks
Diffstat (limited to 'sys/net80211')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud