aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-13 00:29:20 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-13 00:29:20 -0400
commitc1fdb2d3389c5a1e7c559a37a4967c1d2580e75c (patch)
treee4ed8dd46b9f6fbb6c715e66630e7bdaf71c86ab /scripts/mod/file2alias.c
parent1700ff823b27b6572cf4c3cec66d279baa1a5d30 (diff)
parent7fa0e6db3cedc9b70d68a4170f1352e2b1aa0f90 (diff)
Merge branch 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kbuild misc updates from Michal Marek: "This is the non-critical part of kbuild for v3.16-rc1: - make deb-pkg can do s390x and arm64 - new patterns in scripts/tags.sh - scripts/tags.sh skips userspace tools' sources (which sometimes have copies of kernel structures) and symlinks - improvements to the objdiff tool - two new coccinelle patches - other minor fixes" * 'misc' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: scripts: objdiff: support directories for the augument of record command scripts: objdiff: fix a comment scripts: objdiff: change the extension of disassembly from .o to .dis scripts: objdiff: improve path flexibility for record command scripts: objdiff: remove unnecessary code scripts: objdiff: direct error messages to stderr scripts: objdiff: get the path to .tmp_objdiff more simply deb-pkg: Add automatic support for s390x architecture coccicheck: Add unneeded return variable test kbuild: Fix a typo in documentation kbuild: trivial - use tabs for code indent where possible kbuild: trivial - remove trailing empty lines coccinelle: Check for missing NULL terminators in of_device_id tables scripts/tags.sh: ignore symlink'ed source files scripts/tags.sh: add regular expression replacement pattern for memcg builddeb: add arm64 in the supported architectures builddeb: use $OBJCOPY variable instead of objcopy scripts/tags.sh: ignore code of user space tools scripts/tags.sh: add pattern for DEFINE_HASHTABLE .gitignore: ignore Module.symvers in all directories
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c42
1 files changed, 20 insertions, 22 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index 1924990a737f..e614ef689eee 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -644,28 +644,26 @@ ADD_TO_DEVTABLE("pcmcia", pcmcia_device_id, do_pcmcia_entry);
644 644
645static int do_of_entry (const char *filename, void *symval, char *alias) 645static int do_of_entry (const char *filename, void *symval, char *alias)
646{ 646{
647 int len; 647 int len;
648 char *tmp; 648 char *tmp;
649 DEF_FIELD_ADDR(symval, of_device_id, name); 649 DEF_FIELD_ADDR(symval, of_device_id, name);
650 DEF_FIELD_ADDR(symval, of_device_id, type); 650 DEF_FIELD_ADDR(symval, of_device_id, type);
651 DEF_FIELD_ADDR(symval, of_device_id, compatible); 651 DEF_FIELD_ADDR(symval, of_device_id, compatible);
652 652
653 len = sprintf (alias, "of:N%sT%s", 653 len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*",
654 (*name)[0] ? *name : "*", 654 (*type)[0] ? *type : "*");
655 (*type)[0] ? *type : "*"); 655
656 656 if (compatible[0])
657 if (compatible[0]) 657 sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "",
658 sprintf (&alias[len], "%sC%s", 658 *compatible);
659 (*type)[0] ? "*" : "", 659
660 *compatible); 660 /* Replace all whitespace with underscores */
661 661 for (tmp = alias; tmp && *tmp; tmp++)
662 /* Replace all whitespace with underscores */ 662 if (isspace (*tmp))
663 for (tmp = alias; tmp && *tmp; tmp++) 663 *tmp = '_';
664 if (isspace (*tmp)) 664
665 *tmp = '_'; 665 add_wildcard(alias);
666 666 return 1;
667 add_wildcard(alias);
668 return 1;
669} 667}
670ADD_TO_DEVTABLE("of", of_device_id, do_of_entry); 668ADD_TO_DEVTABLE("of", of_device_id, do_of_entry);
671 669