Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b548d9f4 authored by Dmitry Torokhov's avatar Dmitry Torokhov Committed by Lingutla Chandrasekhar
Browse files

driver-core: fix build for !CONFIG_MODULES



Commit f2411da74698 ("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.

Change-Id: I707c72fd58ac5a480471ae693b569022e84ed3f0
Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
Reported-by: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-commit: 80c6e1465948c2e91214f01764f427d31ebedb26
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Signed-off-by: default avatarLingutla Chandrasekhar <clingutla@codeaurora.org>
parent 0f50fb22
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -435,7 +435,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;
+11 −0
Original line number Diff line number Diff line
@@ -519,6 +519,11 @@ int unregister_module_notifier(struct notifier_block *nb);

extern void print_modules(void);

static inline bool module_requested_async_probing(struct module *module)
{
	return module && module->async_probe_requested;
}

#else /* !CONFIG_MODULES... */

/* Given an address, look for it in the exception tables. */
@@ -629,6 +634,12 @@ static inline int unregister_module_notifier(struct notifier_block *nb)
static inline void print_modules(void)
{
}

static inline bool module_requested_async_probing(struct module *module)
{
	return false;
}

#endif /* CONFIG_MODULES */

#ifdef CONFIG_SYSFS