mirror of
https://github.com/linux-msm/laptops-kernel.git
synced 2026-08-13 14:19:53 -07:00
module: Fix device table module aliases
Commit6717e8f91d("kbuild: Remove 'kmod_' prefix from __KBUILD_MODNAME") inadvertently broke module alias generation for modules which rely on MODULE_DEVICE_TABLE(). It removed the "kmod_" prefix from __KBUILD_MODNAME, which caused MODULE_DEVICE_TABLE() to generate a symbol name which no longer matched the format expected by handle_moddevtable() in scripts/mod/file2alias.c. As a result, modpost failed to find the device tables, leading to missing module aliases. Fix this by explicitly adding the "kmod_" string within the MODULE_DEVICE_TABLE() macro itself, restoring the symbol name to the format expected by file2alias.c. Fixes:6717e8f91d("kbuild: Remove 'kmod_' prefix from __KBUILD_MODNAME") Reported-by: Alexander Stein <alexander.stein@ew.tq-group.com> Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Reported-by: Mark Brown <broonie@kernel.org> Reported-by: Cosmin Tanislav <demonsingur@gmail.com> Signed-off-by: Josh Poimboeuf <jpoimboe@kernel.org> Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org> Tested-by: Cosmin Tanislav <demonsingur@gmail.com> Tested-by: Marek Szyprowski <m.szyprowski@samsung.com> Tested-by: Mark Brown <broonie@kernel.org> Tested-by: Alexander Stein <alexander.stein@ew.tq-group.com> Tested-by: Chen-Yu Tsai <wenst@chromium.org> Tested-by: Anders Roxell <anders.roxell@linaro.org> Link: https://patch.msgid.link/e52ee3edf32874da645a9e037a7d77c69893a22a.1760982784.git.jpoimboe@kernel.org
This commit is contained in:
committed by
Peter Zijlstra
parent
da247eff96
commit
9025688bf6
@@ -251,10 +251,11 @@ struct module_kobject *lookup_or_create_module_kobject(const char *name);
|
||||
*/
|
||||
#define __mod_device_table(type, name) \
|
||||
__PASTE(__mod_device_table__, \
|
||||
__PASTE(kmod_, \
|
||||
__PASTE(__KBUILD_MODNAME, \
|
||||
__PASTE(__, \
|
||||
__PASTE(type, \
|
||||
__PASTE(__, name)))))
|
||||
__PASTE(__, name))))))
|
||||
|
||||
/* Creates an alias so file2alias.c can find device table. */
|
||||
#define MODULE_DEVICE_TABLE(type, name) \
|
||||
|
||||
Reference in New Issue
Block a user