Commit d7be3056def73c0ab53b3907f9a70a73253a5ae9
Committed by
Wolfgang Denk
1 parent
5a442c0add
Exists in
master
and in
54 other branches
stdio: constify "name" arg in public api
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Showing 5 changed files with 8 additions and 8 deletions Side-by-side Diff
common/console.c
... | ... | @@ -479,7 +479,7 @@ |
479 | 479 | |
480 | 480 | /** U-Boot INIT FUNCTIONS *************************************************/ |
481 | 481 | |
482 | -struct stdio_dev *search_device(int flags, char *name) | |
482 | +struct stdio_dev *search_device(int flags, const char *name) | |
483 | 483 | { |
484 | 484 | struct stdio_dev *dev; |
485 | 485 | |
... | ... | @@ -491,7 +491,7 @@ |
491 | 491 | return NULL; |
492 | 492 | } |
493 | 493 | |
494 | -int console_assign(int file, char *devname) | |
494 | +int console_assign(int file, const char *devname) | |
495 | 495 | { |
496 | 496 | int flag; |
497 | 497 | struct stdio_dev *dev; |
common/stdio.c
... | ... | @@ -105,7 +105,7 @@ |
105 | 105 | return &(devs.list); |
106 | 106 | } |
107 | 107 | |
108 | -struct stdio_dev* stdio_get_by_name(char* name) | |
108 | +struct stdio_dev* stdio_get_by_name(const char *name) | |
109 | 109 | { |
110 | 110 | struct list_head *pos; |
111 | 111 | struct stdio_dev *dev; |
... | ... | @@ -155,7 +155,7 @@ |
155 | 155 | * returns 0 if success, -1 if device is assigned and 1 if devname not found |
156 | 156 | */ |
157 | 157 | #ifdef CONFIG_SYS_STDIO_DEREGISTER |
158 | -int stdio_deregister(char *devname) | |
158 | +int stdio_deregister(const char *devname) | |
159 | 159 | { |
160 | 160 | int l; |
161 | 161 | struct list_head *pos; |
include/common.h
... | ... | @@ -655,7 +655,7 @@ |
655 | 655 | /* common/console.c */ |
656 | 656 | int console_init_f(void); /* Before relocation; uses the serial stuff */ |
657 | 657 | int console_init_r(void); /* After relocation; uses the console stuff */ |
658 | -int console_assign (int file, char *devname); /* Assign the console */ | |
658 | +int console_assign(int file, const char *devname); /* Assign the console */ | |
659 | 659 | int ctrlc (void); |
660 | 660 | int had_ctrlc (void); /* have we had a Control-C since last clear? */ |
661 | 661 | void clear_ctrlc (void); /* clear the Control-C condition */ |
include/iomux.h
include/stdio_dev.h
... | ... | @@ -93,10 +93,10 @@ |
93 | 93 | int stdio_init (void); |
94 | 94 | void stdio_print_current_devices(void); |
95 | 95 | #ifdef CONFIG_SYS_STDIO_DEREGISTER |
96 | -int stdio_deregister(char *devname); | |
96 | +int stdio_deregister(const char *devname); | |
97 | 97 | #endif |
98 | 98 | struct list_head* stdio_get_list(void); |
99 | -struct stdio_dev* stdio_get_by_name(char* name); | |
99 | +struct stdio_dev* stdio_get_by_name(const char* name); | |
100 | 100 | struct stdio_dev* stdio_clone(struct stdio_dev *dev); |
101 | 101 | |
102 | 102 | #ifdef CONFIG_ARM_DCC_MULTI |