]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
stdio: constify "name" arg in public api
authorMike Frysinger <vapier@gentoo.org>
Wed, 20 Oct 2010 11:18:03 +0000 (07:18 -0400)
committerWolfgang Denk <wd@denx.de>
Thu, 9 Dec 2010 09:24:09 +0000 (10:24 +0100)
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
common/console.c
common/stdio.c
include/common.h
include/iomux.h
include/stdio_dev.h

index 7e018863bd3e0bdf85a294f74470df446458ef5b..8c650e05e1c352ff5406b576387cb25dd2f5dd35 100644 (file)
@@ -479,7 +479,7 @@ inline void dbg(const char *fmt, ...)
 
 /** U-Boot INIT FUNCTIONS *************************************************/
 
-struct stdio_dev *search_device(int flags, char *name)
+struct stdio_dev *search_device(int flags, const char *name)
 {
        struct stdio_dev *dev;
 
@@ -491,7 +491,7 @@ struct stdio_dev *search_device(int flags, char *name)
        return NULL;
 }
 
-int console_assign(int file, char *devname)
+int console_assign(int file, const char *devname)
 {
        int flag;
        struct stdio_dev *dev;
index ab7c5abde1bbe3c0eb4048b07c7b390ef47adaec..b20772c45d7f05d550a358fcbf1755c501e6e5b9 100644 (file)
@@ -105,7 +105,7 @@ struct list_head* stdio_get_list(void)
        return &(devs.list);
 }
 
-struct stdio_dev* stdio_get_by_name(char* name)
+struct stdio_dev* stdio_get_by_name(const char *name)
 {
        struct list_head *pos;
        struct stdio_dev *dev;
@@ -155,7 +155,7 @@ int stdio_register (struct stdio_dev * dev)
  * returns 0 if success, -1 if device is assigned and 1 if devname not found
  */
 #ifdef CONFIG_SYS_STDIO_DEREGISTER
-int stdio_deregister(char *devname)
+int stdio_deregister(const char *devname)
 {
        int l;
        struct list_head *pos;
index 189ad8122b6445797a55bb597a0f581694057925..0d1c8724a975f2cb0fea2dbc511beacb1d1d15a3 100644 (file)
@@ -655,7 +655,7 @@ char *      strmhz(char *buf, long hz);
 /* common/console.c */
 int    console_init_f(void);   /* Before relocation; uses the serial  stuff    */
 int    console_init_r(void);   /* After  relocation; uses the console stuff    */
-int    console_assign (int file, char *devname);       /* Assign the console   */
+int    console_assign(int file, const char *devname);  /* Assign the console   */
 int    ctrlc (void);
 int    had_ctrlc (void);       /* have we had a Control-C since last clear? */
 void   clear_ctrlc (void);     /* clear the Control-C condition */
index e38a81e77509c881ec20abfb1a9968ae84ce7d50..fcf0f9319e5670cbcb81f16a4d5736373b6a8b95 100644 (file)
@@ -43,6 +43,6 @@ extern int cd_count[MAX_FILES];
 
 int iomux_doenv(const int, const char *);
 void iomux_printdevs(const int);
-struct stdio_dev *search_device(int, char *);
+struct stdio_dev *search_device(int, const char *);
 
 #endif /* _IO_MUX_H */
index 83da4cdff15e8fb8824a93d25cbdc37d9732b342..82ad463c10af3d8930df77f7f8d82ee5c70c4a5d 100644 (file)
@@ -93,10 +93,10 @@ int stdio_register (struct stdio_dev * dev);
 int    stdio_init (void);
 void   stdio_print_current_devices(void);
 #ifdef CONFIG_SYS_STDIO_DEREGISTER
-int    stdio_deregister(char *devname);
+int    stdio_deregister(const char *devname);
 #endif
 struct list_head* stdio_get_list(void);
-struct stdio_dev* stdio_get_by_name(char* name);
+struct stdio_dev* stdio_get_by_name(const char* name);
 struct stdio_dev* stdio_clone(struct stdio_dev *dev);
 
 #ifdef CONFIG_ARM_DCC_MULTI