diff options
author | Jeff Dike <jdike@addtoit.com> | 2006-01-06 03:18:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 11:33:45 -0500 |
commit | 970d6e3a3461ebc62bc3fc6d4962c936cb2ed97c (patch) | |
tree | 0af12c696e86ec294d966c704821f806b6e28883 /arch/um/drivers/line.c | |
parent | 118c1f27b838c5d1cf5338dc5abff52ceb364826 (diff) |
[PATCH] uml: use kstrdup
There were a bunch of calls to uml_strdup dating from before kstrdup was
introduced. This changes those calls. It doesn't eliminate the definition
since there is still a couple of calls in userspace code (which should
probably call the libc strdup).
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/um/drivers/line.c')
-rw-r--r-- | arch/um/drivers/line.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index e0fdffa2d542..c31fc541e210 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -562,10 +562,11 @@ int line_setup(struct line *lines, unsigned int num, char *init, int all_allowed | |||
562 | 562 | ||
563 | int line_config(struct line *lines, unsigned int num, char *str) | 563 | int line_config(struct line *lines, unsigned int num, char *str) |
564 | { | 564 | { |
565 | char *new = uml_strdup(str); | 565 | char *new; |
566 | 566 | ||
567 | new = kstrdup(str, GFP_KERNEL); | ||
567 | if(new == NULL){ | 568 | if(new == NULL){ |
568 | printk("line_config - uml_strdup failed\n"); | 569 | printk("line_config - kstrdup failed\n"); |
569 | return -ENOMEM; | 570 | return -ENOMEM; |
570 | } | 571 | } |
571 | return !line_setup(lines, num, new, 0); | 572 | return !line_setup(lines, num, new, 0); |
@@ -677,10 +678,9 @@ void lines_init(struct line *lines, int nlines) | |||
677 | INIT_LIST_HEAD(&line->chan_list); | 678 | INIT_LIST_HEAD(&line->chan_list); |
678 | spin_lock_init(&line->lock); | 679 | spin_lock_init(&line->lock); |
679 | if(line->init_str != NULL){ | 680 | if(line->init_str != NULL){ |
680 | line->init_str = uml_strdup(line->init_str); | 681 | line->init_str = kstrdup(line->init_str, GFP_KERNEL); |
681 | if(line->init_str == NULL) | 682 | if(line->init_str == NULL) |
682 | printk("lines_init - uml_strdup returned " | 683 | printk("lines_init - kstrdup returned NULL\n"); |
683 | "NULL\n"); | ||
684 | } | 684 | } |
685 | } | 685 | } |
686 | } | 686 | } |