[PATCH 1/2] UBUNTU: ARM: IMX51: Make video capture drivers compile

amit.kucheria at canonical.com amit.kucheria at canonical.com
Tue Jul 28 09:25:20 UTC 2009


From: Amit Kucheria <amit.kucheria at canonical.com>

Function prototypes have changed, inode pointer is no longer required.

Signed-off-by: Amit Kucheria <amit.kucheria at canonical.com>
---
 drivers/media/video/mxc/capture/mxc_v4l2_capture.c |   19 ++++++-------------
 1 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index 280cbb0..69e72c6 100644
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -1246,13 +1246,12 @@ static int mxc_v4l_dqueue(cam_data *cam, struct v4l2_buffer *buf)
 /*!
  * V4L interface - open function
  *
- * @param inode        structure inode *
  * @param file         structure file *
  *
  * @return  status    0 success, ENODEV invalid device instance,
  *                    ENODEV timeout, ERESTARTSYS interrupted by user
  */
-static int mxc_v4l_open(struct inode *inode, struct file *file)
+static int mxc_v4l_open(struct file *file)
 {
 	struct v4l2_ifparm ifparm;
 	struct v4l2_format cam_fmt;
@@ -1386,12 +1385,11 @@ static int mxc_v4l_open(struct inode *inode, struct file *file)
 /*!
  * V4L interface - close function
  *
- * @param inode    struct inode *
  * @param file     struct file *
  *
  * @return         0 success
  */
-static int mxc_v4l_close(struct inode *inode, struct file *file)
+static int mxc_v4l_close(struct file *file)
 {
 	struct video_device *dev = video_devdata(file);
 	int err = 0;
@@ -1517,8 +1515,6 @@ static ssize_t mxc_v4l_read(struct file *file, char *buf, size_t count,
 /*!
  * V4L interface - ioctl function
  *
- * @param inode      struct inode*
- *
  * @param file       struct file*
  *
  * @param ioctlnr    unsigned int
@@ -1528,8 +1524,7 @@ static ssize_t mxc_v4l_read(struct file *file, char *buf, size_t count,
  * @return           0 success, ENODEV for invalid device instance,
  *                   -1 for other errors.
  */
-static int mxc_v4l_do_ioctl(struct inode *inode, struct file *file,
-			    unsigned int ioctlnr, void *arg)
+static long mxc_v4l_do_ioctl(struct file *file, unsigned int ioctlnr, void *arg)
 {
 	struct video_device *dev = video_devdata(file);
 	cam_data *cam = video_get_drvdata(dev);
@@ -1941,11 +1936,10 @@ static int mxc_v4l_do_ioctl(struct inode *inode, struct file *file,
  *
  * @return  None
  */
-static int mxc_v4l_ioctl(struct inode *inode, struct file *file,
-			 unsigned int cmd, unsigned long arg)
+static long mxc_v4l_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
 	pr_debug("In MVC:mxc_v4l_ioctl\n");
-	return video_usercopy(inode, file, cmd, arg, mxc_v4l_do_ioctl);
+	return video_usercopy(file, cmd, arg, mxc_v4l_do_ioctl);
 }
 
 /*!
@@ -2022,7 +2016,7 @@ static unsigned int mxc_poll(struct file *file, poll_table *wait)
 /*!
  * This structure defines the functions to be called in this driver.
  */
-static struct file_operations mxc_v4l_fops = {
+static struct v4l2_file_operations mxc_v4l_fops = {
 	.owner = THIS_MODULE,
 	.open = mxc_v4l_open,
 	.release = mxc_v4l_close,
@@ -2034,7 +2028,6 @@ static struct file_operations mxc_v4l_fops = {
 
 static struct video_device mxc_v4l_template = {
 	.name = "Mxc Camera",
-	.vfl_type = VID_TYPE_CAPTURE,
 	.fops = &mxc_v4l_fops,
 	.release = video_device_release,
 };
-- 
1.6.3.3





More information about the kernel-team mailing list