diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mod/modpost.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index e1f2b31cf34b..281abb77e033 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c | |||
@@ -1345,6 +1345,7 @@ static void add_depends(struct buffer *b, struct module *mod, | |||
1345 | buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); | 1345 | buf_printf(b, "__attribute__((section(\".modinfo\"))) =\n"); |
1346 | buf_printf(b, "\"depends="); | 1346 | buf_printf(b, "\"depends="); |
1347 | for (s = mod->unres; s; s = s->next) { | 1347 | for (s = mod->unres; s; s = s->next) { |
1348 | const char *p; | ||
1348 | if (!s->module) | 1349 | if (!s->module) |
1349 | continue; | 1350 | continue; |
1350 | 1351 | ||
@@ -1352,8 +1353,11 @@ static void add_depends(struct buffer *b, struct module *mod, | |||
1352 | continue; | 1353 | continue; |
1353 | 1354 | ||
1354 | s->module->seen = 1; | 1355 | s->module->seen = 1; |
1355 | buf_printf(b, "%s%s", first ? "" : ",", | 1356 | if ((p = strrchr(s->module->name, '/')) != NULL) |
1356 | strrchr(s->module->name, '/') + 1); | 1357 | p++; |
1358 | else | ||
1359 | p = s->module->name; | ||
1360 | buf_printf(b, "%s%s", first ? "" : ",", p); | ||
1357 | first = 0; | 1361 | first = 0; |
1358 | } | 1362 | } |
1359 | buf_printf(b, "\";\n"); | 1363 | buf_printf(b, "\";\n"); |