bool driver_allows_async_probing(struct device_driver *drv)
{
- return drv->probe_type == PROBE_PREFER_ASYNCHRONOUS;
+ switch (drv->probe_type) {
+ case PROBE_PREFER_ASYNCHRONOUS:
+ return true;
+
+ case PROBE_FORCE_SYNCHRONOUS:
+ return false;
+
+ default:
+ if (drv->owner && drv->owner->async_probe_requested)
+ return true;
+
+ return false;
+ }
}
struct device_attach_data {