aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2008-02-05 01:30:41 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-05 12:44:25 -0500
commitc0a9290ecf0dbb89958cb3a3f78964015a7de402 (patch)
tree1a987905fe5047cd74966149fc11689713cd7bea /arch/um/drivers
parent9226b8384776798986640ce07764d17ba66aa54f (diff)
uml: const and other tidying
This patch also does some improvements for uml code. Improvements include dropping unnecessary cast, killing some unnecessary code and still some constifying for pointers etc.. Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Jeff Dike <jdike@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um/drivers')
-rw-r--r--arch/um/drivers/ubd_kern.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 9793e3da0f1d..7a252abbfead 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -229,7 +229,7 @@ static int proc_ide_read_media(char *page, char **start, off_t off, int count,
229 return len; 229 return len;
230} 230}
231 231
232static void make_ide_entries(char *dev_name) 232static void make_ide_entries(const char *dev_name)
233{ 233{
234 struct proc_dir_entry *dir, *ent; 234 struct proc_dir_entry *dir, *ent;
235 char name[64]; 235 char name[64];
@@ -244,7 +244,7 @@ static void make_ide_entries(char *dev_name)
244 ent->data = NULL; 244 ent->data = NULL;
245 ent->read_proc = proc_ide_read_media; 245 ent->read_proc = proc_ide_read_media;
246 ent->write_proc = NULL; 246 ent->write_proc = NULL;
247 sprintf(name,"ide0/%s", dev_name); 247 snprintf(name, sizeof(name), "ide0/%s", dev_name);
248 proc_symlink(dev_name, proc_ide_root, name); 248 proc_symlink(dev_name, proc_ide_root, name);
249} 249}
250 250
@@ -443,7 +443,7 @@ __uml_help(ubd_setup,
443" cluster filesystem and inappropriate at almost all other times.\n\n" 443" cluster filesystem and inappropriate at almost all other times.\n\n"
444); 444);
445 445
446static int udb_setup(char *str) 446static int udb_setup(const char *str)
447{ 447{
448 printk("udb%s specified on command line is almost certainly a ubd -> " 448 printk("udb%s specified on command line is almost certainly a ubd -> "
449 "udb TYPO\n", str); 449 "udb TYPO\n", str);