From patchwork Wed Oct 20 11:18:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 71907 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: wd@gemini.denx.de Delivered-To: wd@gemini.denx.de Received: from diddl.denx.de (diddl.denx.de [10.0.0.6]) by gemini.denx.de (Postfix) with ESMTP id 09ED7136321 for ; Wed, 20 Oct 2010 13:22:05 +0200 (CEST) Received: from diddl.denx.de (localhost.localdomain [127.0.0.1]) by diddl.denx.de (Postfix) with ESMTP id EAE98348C9D1 for ; Wed, 20 Oct 2010 13:22:04 +0200 (CEST) Received: from pop.mnet-online.de by diddl.denx.de with POP3 (fetchmail-6.3.17) for (single-drop); Wed, 20 Oct 2010 13:22:04 +0200 (CEST) Received: from murder ([192.168.8.180]) by backend2 (Cyrus v2.2.12) with LMTPA; Wed, 20 Oct 2010 13:19:18 +0200 X-Sieve: CMU Sieve 2.2 Received: from mail.m-online.net (localhost [127.0.0.1]) by frontend1.mail.m-online.net (Cyrus v2.2.12) with LMTPA; Wed, 20 Oct 2010 13:19:18 +0200 Received: from scanner-1.m-online.net (scanner-1.mail.m-online.net [192.168.8.165]) by mail.m-online.net (Postfix) with ESMTP id 3541C1C00312; Wed, 20 Oct 2010 13:19:18 +0200 (CEST) Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by mxin-3.m-online.net (Postfix) with ESMTP id D1F5D46C0B3; Wed, 20 Oct 2010 13:19:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C542B283B2; Wed, 20 Oct 2010 13:18:38 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SGQlIs0anGGb; Wed, 20 Oct 2010 13:18:38 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 98DF52836E; Wed, 20 Oct 2010 13:18:32 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA3BF2839B for ; Wed, 20 Oct 2010 13:18:29 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id B3SiG2ncOsbE for ; Wed, 20 Oct 2010 13:18:29 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 9EE42282DB for ; Wed, 20 Oct 2010 13:18:26 +0200 (CEST) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id D65701B40B5 for ; Wed, 20 Oct 2010 11:18:24 +0000 (UTC) From: Mike Frysinger To: u-boot@lists.denx.de Date: Wed, 20 Oct 2010 07:18:03 -0400 Message-Id: <1287573483-6777-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3.1 Subject: [U-Boot] [PATCH] stdio: constify "name" arg in public api X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de X-Virus-Scanned: by amavisd-new at m-online.net Signed-off-by: Mike Frysinger --- common/console.c | 4 ++-- common/stdio.c | 4 ++-- include/common.h | 2 +- include/iomux.h | 2 +- include/stdio_dev.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/common/console.c b/common/console.c index 7e01886..8c650e0 100644 --- a/common/console.c +++ b/common/console.c @@ -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; diff --git a/common/stdio.c b/common/stdio.c index 2501369..462df24 100644 --- a/common/stdio.c +++ b/common/stdio.c @@ -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; diff --git a/include/common.h b/include/common.h index 0686a17..9acd086 100644 --- a/include/common.h +++ b/include/common.h @@ -654,7 +654,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 */ diff --git a/include/iomux.h b/include/iomux.h index e38a81e..fcf0f93 100644 --- a/include/iomux.h +++ b/include/iomux.h @@ -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 */ diff --git a/include/stdio_dev.h b/include/stdio_dev.h index 83da4cd..82ad463 100644 --- a/include/stdio_dev.h +++ b/include/stdio_dev.h @@ -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