From 7298097b0dd0e076ac718a9c47d6627f719f6f1f Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=BB=84=E6=B6=9B?= Date: Sat, 30 Jul 2011 22:16:26 +0800 Subject: [PATCH] Revert "Implement read(2) in ashmem driver" This reverts commit 16fe6f1aa71cbfafed933c220cdaf1a0bad09980. --- mm/ashmem.c | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/mm/ashmem.c b/mm/ashmem.c index 04e886e2c909..230810f9387c 100644 --- a/mm/ashmem.c +++ b/mm/ashmem.c @@ -211,31 +211,6 @@ static int ashmem_release(struct inode *ignored, struct file *file) return 0; } -static ssize_t ashmem_read(struct file *file, char __user *buf, - size_t len, loff_t *pos) -{ - struct ashmem_area *asma = file->private_data; - int ret = 0; - - mutex_lock(&ashmem_mutex); - - /* If size is not set, or set to 0, always return EOF. */ - if (asma->size == 0) { - goto out; - } - - if (!asma->file) { - ret = -EBADF; - goto out; - } - - ret = asma->file->f_op->read(asma->file, buf, len, pos); - -out: - mutex_unlock(&ashmem_mutex); - return ret; -} - static int ashmem_mmap(struct file *file, struct vm_area_struct *vma) { struct ashmem_area *asma = file->private_data; @@ -629,7 +604,6 @@ static struct file_operations ashmem_fops = { .owner = THIS_MODULE, .open = ashmem_open, .release = ashmem_release, - .read = ashmem_read, .mmap = ashmem_mmap, .unlocked_ioctl = ashmem_ioctl, .compat_ioctl = ashmem_ioctl, -- 2.34.1