summaryrefslogtreecommitdiffstats
path: root/drivers/char/mem.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-03-02 02:36:47 +0000
commit8624512aa908741ba2795200133eae0d7f4557ea (patch)
treed5d3036fccf2604f4c98dedc11e8adb929d6b52e /drivers/char/mem.c
parent7b8f5d6f1d45d9f9de1d26e7d3c32aa5af11b488 (diff)
Merge with 2.3.48.
Diffstat (limited to 'drivers/char/mem.c')
-rw-r--r--drivers/char/mem.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c
index e70860ea9..824ef94e4 100644
--- a/drivers/char/mem.c
+++ b/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,8 +286,7 @@ static ssize_t write_kmem(struct file * file, const char * buf,
return do_write_mem(file, (void*)p, p, buf, count, ppos);
}
-#if (!defined(CONFIG_PPC) && !defined(__mc68000__) && !defined(__mips__)) || \
- defined(CONFIG_HAVE_IO_PORTS)
+#if (!defined(__mc68000__) && !defined(__mips__)) || defined(CONFIG_HAVE_IO_PORTS)
static ssize_t read_port(struct file * file, char * buf,
size_t count, loff_t *ppos)
{
@@ -435,7 +435,7 @@ out:
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;
@@ -515,8 +515,7 @@ static struct file_operations null_fops = {
write: write_null,
};
-#if (!defined(CONFIG_PPC) && !defined(__mc68000__) && !defined(__mips__)) || \
- defined(CONFIG_HAVE_IO_PORTS)
+#if (!defined(__mc68000__) && !defined(__mips__)) || defined(CONFIG_HAVE_IO_PORTS)
static struct file_operations port_fops = {
llseek: memory_lseek,
read: read_port,
@@ -550,8 +549,7 @@ static int memory_open(struct inode * inode, struct file * filp)
case 3:
filp->f_op = &null_fops;
break;
-#if (!defined(CONFIG_PPC) && !defined(__mc68000__) && !defined(__mips__)) || \
- defined(CONFIG_HAVE_IO_PORTS)
+#if (!defined(__mc68000__) && !defined(__mips__)) || defined(CONFIG_HAVE_IO_PORTS)
case 4:
filp->f_op = &port_fops;
break;