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

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

diff -u --recursive --new-file v2.3.13/linux/drivers/char/mem.c linux/drivers/char/mem.c
@@ -465,17 +465,12 @@
 	return capable(CAP_SYS_RAWIO) ? 0 : -EPERM;
 }
 
-static int open_mem(struct inode * inode, struct file * filp)
-{
-	return (capable(CAP_SYS_RAWIO)
-		|| !(filp->f_mode & FMODE_WRITE)) ? 0 : -EPERM;
-}
-
 #define mmap_kmem	mmap_mem
 #define zero_lseek	null_lseek
 #define full_lseek      null_lseek
 #define write_zero	write_null
 #define read_full       read_zero
+#define open_mem	open_port
 #define open_kmem	open_mem
 
 static struct file_operations mem_fops = {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)