diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2013-07-12 06:34:42 -0400 |
commit | f2006e27396f55276f24434f56e208d86e7f9908 (patch) | |
tree | 71896db916d33888b4286f80117d3cac0da40e6d /scripts/mod/file2alias.c | |
parent | e399eb56a6110e13f97e644658648602e2b08de7 (diff) | |
parent | 9903883f1dd6e86f286b7bfa6e4b423f98c1cd9e (diff) |
Merge branch 'linus' into timers/urgent
Get upstream changes so we can apply fixes against them
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 45f9a3377dcd..23708636b05c 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -79,10 +79,12 @@ struct devtable **__start___devtable, **__stop___devtable; | |||
79 | extern struct devtable *__start___devtable[], *__stop___devtable[]; | 79 | extern struct devtable *__start___devtable[], *__stop___devtable[]; |
80 | #endif /* __MACH__ */ | 80 | #endif /* __MACH__ */ |
81 | 81 | ||
82 | #if __GNUC__ == 3 && __GNUC_MINOR__ < 3 | 82 | #if !defined(__used) |
83 | # define __used __attribute__((__unused__)) | 83 | # if __GNUC__ == 3 && __GNUC_MINOR__ < 3 |
84 | #else | 84 | # define __used __attribute__((__unused__)) |
85 | # define __used __attribute__((__used__)) | 85 | # else |
86 | # define __used __attribute__((__used__)) | ||
87 | # endif | ||
86 | #endif | 88 | #endif |
87 | 89 | ||
88 | /* Define a variable f that holds the value of field f of struct devid | 90 | /* Define a variable f that holds the value of field f of struct devid |
@@ -1145,6 +1147,26 @@ static int do_mei_entry(const char *filename, void *symval, | |||
1145 | } | 1147 | } |
1146 | ADD_TO_DEVTABLE("mei", mei_cl_device_id, do_mei_entry); | 1148 | ADD_TO_DEVTABLE("mei", mei_cl_device_id, do_mei_entry); |
1147 | 1149 | ||
1150 | /* Looks like: rapidio:vNdNavNadN */ | ||
1151 | static int do_rio_entry(const char *filename, | ||
1152 | void *symval, char *alias) | ||
1153 | { | ||
1154 | DEF_FIELD(symval, rio_device_id, did); | ||
1155 | DEF_FIELD(symval, rio_device_id, vid); | ||
1156 | DEF_FIELD(symval, rio_device_id, asm_did); | ||
1157 | DEF_FIELD(symval, rio_device_id, asm_vid); | ||
1158 | |||
1159 | strcpy(alias, "rapidio:"); | ||
1160 | ADD(alias, "v", vid != RIO_ANY_ID, vid); | ||
1161 | ADD(alias, "d", did != RIO_ANY_ID, did); | ||
1162 | ADD(alias, "av", asm_vid != RIO_ANY_ID, asm_vid); | ||
1163 | ADD(alias, "ad", asm_did != RIO_ANY_ID, asm_did); | ||
1164 | |||
1165 | add_wildcard(alias); | ||
1166 | return 1; | ||
1167 | } | ||
1168 | ADD_TO_DEVTABLE("rapidio", rio_device_id, do_rio_entry); | ||
1169 | |||
1148 | /* Does namelen bytes of name exactly match the symbol? */ | 1170 | /* Does namelen bytes of name exactly match the symbol? */ |
1149 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) | 1171 | static bool sym_is(const char *name, unsigned namelen, const char *symbol) |
1150 | { | 1172 | { |