[media] zoran: remove unused read/write functions

This change “[media] zoran: remove unused read/write functions” in Linux kernel is authored by Hans Verkuil <hans.verkuil [at] cisco.com> on Mon Jul 20 10:18:19 2015 -0300.

[media] zoran: remove unused read/write functions

The zoran_read/write functions always return an error. Just remove them.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 8148802.

There are 25 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/media/pci/zoran/zoran_driver.c | 25 -------------------------
 1 file changed, 25 deletions(-)

diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c
index 25cd18b..3d3a0c0 100644
--- a/drivers/media/pci/zoran/zoran_driver.c
+++ b/drivers/media/pci/zoran/zoran_driver.c
@@ -1032,29 +1032,6 @@ static int zoran_open(struct file *file)
 	return 0;
 }
 
-
-static ssize_t
-zoran_read (struct file *file,
-	    char        __user *data,
-	    size_t       count,
-	    loff_t      *ppos)
-{
-	/* we simply don't support read() (yet)... */
-
-	return -EINVAL;
-}
-
-static ssize_t
-zoran_write (struct file *file,
-	     const char  __user *data,
-	     size_t       count,
-	     loff_t      *ppos)
-{
-	/* ...and the same goes for write() */
-
-	return -EINVAL;
-}
-
 static int setup_fbuffer(struct zoran_fh *fh,
 	       void                      *base,
 	       const struct zoran_format *fmt,
@@ -3052,8 +3029,6 @@ static long zoran_ioctl(struct file *file, unsigned int cmd,
 	.open = zoran_open,
 	.release = zoran_close,
 	.unlocked_ioctl = zoran_ioctl,
-	.read = zoran_read,
-	.write = zoran_write,
 	.mmap = zoran_mmap,
 	.poll = zoran_poll,
 };

The commit for this change in Linux stable tree is 8148802 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *