aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/file2alias.c
diff options
context:
space:
mode:
authorJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-31 00:57:05 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-31 00:57:05 -0400
commit5bc65793cbf8da0d35f19ef025dda22887e79e80 (patch)
tree8291998abd73055de6f487fafa174ee2a5d3afee /scripts/mod/file2alias.c
parent6edae708bf77e012d855a7e2c7766f211d234f4f (diff)
parent3f0a6766e0cc5a577805732e5adb50a585c58175 (diff)
[SCSI] Merge up to linux-2.6 head
Conflicts: drivers/scsi/jazz_esp.c Same changes made by both SCSI and SPARC trees: problem with UTF-8 conversion in the copyright. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r--scripts/mod/file2alias.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index ed1244dd58d0..f646381dc015 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -353,11 +353,16 @@ static int do_pcmcia_entry(const char *filename,
353 353
354static int do_of_entry (const char *filename, struct of_device_id *of, char *alias) 354static int do_of_entry (const char *filename, struct of_device_id *of, char *alias)
355{ 355{
356 int len;
356 char *tmp; 357 char *tmp;
357 sprintf (alias, "of:N%sT%sC%s", 358 len = sprintf (alias, "of:N%sT%s",
358 of->name[0] ? of->name : "*", 359 of->name[0] ? of->name : "*",
359 of->type[0] ? of->type : "*", 360 of->type[0] ? of->type : "*");
360 of->compatible[0] ? of->compatible : "*"); 361
362 if (of->compatible[0])
363 sprintf (&alias[len], "%sC%s",
364 of->type[0] ? "*" : "",
365 of->compatible);
361 366
362 /* Replace all whitespace with underscores */ 367 /* Replace all whitespace with underscores */
363 for (tmp = alias; tmp && *tmp; tmp++) 368 for (tmp = alias; tmp && *tmp; tmp++)