patch-2.3.48 linux/drivers/char/mem.c
Next file: linux/drivers/char/misc.c
Previous file: linux/drivers/char/lp.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Sat Feb 26 20:24:58 2000
- Orig file:
v2.3.47/linux/drivers/char/mem.c
- Orig date:
Wed Feb 16 17:03:52 2000
diff -u --recursive --new-file v2.3.47/linux/drivers/char/mem.c linux/drivers/char/mem.c
@@ -5,6 +5,7 @@
*
* Added devfs support.
* Jan-11-1998, C. Scott Ananian <cananian@alumni.princeton.edu>
+ * Shared /dev/zero mmaping support, Feb 2000, Kanoj Sarcar <kanoj@sgi.com>
*/
#include <linux/config.h>
@@ -285,7 +286,7 @@
return do_write_mem(file, (void*)p, p, buf, count, ppos);
}
-#if !defined(CONFIG_PPC) && !defined(__mc68000__)
+#if !defined(__mc68000__)
static ssize_t read_port(struct file * file, char * buf,
size_t count, loff_t *ppos)
{
@@ -434,7 +435,7 @@
static int mmap_zero(struct file * file, struct vm_area_struct * vma)
{
if (vma->vm_flags & VM_SHARED)
- return -EINVAL;
+ return map_zero_setup(vma);
if (zeromap_page_range(vma->vm_start, vma->vm_end - vma->vm_start, vma->vm_page_prot))
return -EAGAIN;
return 0;
@@ -514,7 +515,7 @@
write: write_null,
};
-#if !defined(CONFIG_PPC) && !defined(__mc68000__)
+#if !defined(__mc68000__)
static struct file_operations port_fops = {
llseek: memory_lseek,
read: read_port,
@@ -548,7 +549,7 @@
case 3:
filp->f_op = &null_fops;
break;
-#if !defined(CONFIG_PPC) && !defined(__mc68000__)
+#if !defined(__mc68000__)
case 4:
filp->f_op = &port_fops;
break;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)