patch-1.3.15 linux/drivers/char/mem.c

Next file: linux/drivers/char/msbusmouse.c
Previous file: linux/drivers/char/lp.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.14/linux/drivers/char/mem.c linux/drivers/char/mem.c
@@ -30,7 +30,7 @@
 	return -EIO;
 }
 
-static int write_ram(struct inode * inode, struct file * file,char * buf, int count)
+static int write_ram(struct inode * inode, struct file * file, const char * buf, int count)
 {
 	return -EIO;
 }
@@ -60,7 +60,7 @@
 	return read;
 }
 
-static int write_mem(struct inode * inode, struct file * file,char * buf, int count)
+static int write_mem(struct inode * inode, struct file * file,const char * buf, int count)
 {
 	unsigned long p = file->f_pos;
 	int written;
@@ -134,10 +134,10 @@
 	return tmp-buf;
 }
 
-static int write_port(struct inode * inode,struct file * file,char * buf, int count)
+static int write_port(struct inode * inode,struct file * file,const char * buf, int count)
 {
 	unsigned int i = file->f_pos;
-	char * tmp = buf;
+	const char * tmp = buf;
 
 	while (count-- > 0 && i < 65536) {
 		outb(get_user(tmp),i);
@@ -153,7 +153,7 @@
 	return 0;
 }
 
-static int write_null(struct inode * inode,struct file * file,char * buf, int count)
+static int write_null(struct inode * inode,struct file * file, const char * buf, int count)
 {
 	return count;
 }
@@ -183,7 +183,7 @@
 	return count;
 }
 
-static int write_full(struct inode * inode,struct file * file,char * buf, int count)
+static int write_full(struct inode * inode,struct file * file, const char * buf, int count)
 {
 	return -ENOSPC;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this