driver-core: fix build for !CONFIG_MODULES

Commit f2411da746 ("driver-core: add driver module asynchronous probe
support") broke build in case modules are disabled, because in this case
"struct module" is not defined and we can't dereference it. Let's define
module_requested_async_probing() helper and stub it out if modules are
disabled.

Reported-by: kbuild test robot <[email protected]>
Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
Dmitry Torokhov 2015-05-21 15:49:37 -07:00 • committed by Greg Kroah-Hartman
commit 80c6e14659
2 changed files with 12 additions and 1 deletions

View file

@ -427,7 +427,7 @@ bool driver_allows_async_probing(struct device_driver *drv)
return false;
default:
if (drv->owner && drv->owner->async_probe_requested)
if (module_requested_async_probing(drv->owner))
return true;
return false;