diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-09-28 02:21:55 -0400 |
---|---|---|
committer | Masahiro Yamada <yamada.masahiro@socionext.com> | 2018-10-18 20:47:44 -0400 |
commit | 153e04b373dd5a4fdb841a727e47c40b1ad10ffc (patch) | |
tree | 63f804ce5318013d085f40486da72dbe7bf1c357 /scripts/mod/file2alias.c | |
parent | 80d0dda3a4e5ba00ae6a45fa840096dc9633aad7 (diff) |
modpost: remove leftover symbol prefix handling for module device table
Blackfin and metag were the only architectures that prefix symbols with
an underscore. They were removed by commit 4ba66a976072 ("arch: remove
blackfin port"), commit bb6fb6dfcc17 ("metag: Remove arch/metag/"),
respectively.
It is no longer necessary to handle <prefix> part of module device
table symbols.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 7be43697ff84..ba4ebc4b346e 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -1415,11 +1415,10 @@ void handle_moddevtable(struct module *mod, struct elf_info *info, | |||
1415 | if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) | 1415 | if (ELF_ST_TYPE(sym->st_info) != STT_OBJECT) |
1416 | return; | 1416 | return; |
1417 | 1417 | ||
1418 | /* All our symbols are of form <prefix>__mod_<name>__<identifier>_device_table. */ | 1418 | /* All our symbols are of form __mod_<name>__<identifier>_device_table. */ |
1419 | name = strstr(symname, "__mod_"); | 1419 | if (strncmp(symname, "__mod_", strlen("__mod_"))) |
1420 | if (!name) | ||
1421 | return; | 1420 | return; |
1422 | name += strlen("__mod_"); | 1421 | name = symname + strlen("__mod_"); |
1423 | namelen = strlen(name); | 1422 | namelen = strlen(name); |
1424 | if (namelen < strlen("_device_table")) | 1423 | if (namelen < strlen("_device_table")) |
1425 | return; | 1424 | return; |