summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorLiu Ying <b17645@freescale.com>2009-10-29 17:52:52 -0400
committerLiu Ying <b17645@freescale.com>2009-11-02 08:55:32 -0500
commit0797469fc8d6f1146ffca569ea3b09bd52433107 (patch)
treeed8617ec5b91991bb2481c73cc7582ffe878e481 /drivers/media
parent601830c0742c05bac4925cabcdd8b39576b6f99d (diff)
ENGR00117835-2 V4L2 capture:Update MXC V4L2 capture for 2.6.31 kernel
1)Update MXC V4L2 capture driver for 2.6.31 kernel. 2)Update ov3640 camera and ov2640 camera driver for 2.6.31 kernel. Signed-off-by: Liu Ying <b17645@freescale.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/mxc/capture/mxc_v4l2_capture.c23
-rw-r--r--drivers/media/video/mxc/capture/ov2640.c1
-rw-r--r--drivers/media/video/mxc/capture/ov3640.c1
3 files changed, 11 insertions, 14 deletions
diff --git a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
index 1852d702e505..be733338c1b5 100644
--- a/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
+++ b/drivers/media/video/mxc/capture/mxc_v4l2_capture.c
@@ -1309,13 +1309,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;
@@ -1457,12 +1456,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;
@@ -1599,8 +1597,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
@@ -1610,7 +1606,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,
+static long mxc_v4l_do_ioctl(struct file *file,
unsigned int ioctlnr, void *arg)
{
struct video_device *dev = video_devdata(file);
@@ -2086,11 +2082,11 @@ 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);
}
/*!
@@ -2140,11 +2136,11 @@ static int mxc_mmap(struct file *file, struct vm_area_struct *vma)
*
* @param file structure file *
*
- * @param wait structure poll_table *
+ * @param wait structure poll_table_struct *
*
* @return status POLLIN | POLLRDNORM
*/
-static unsigned int mxc_poll(struct file *file, poll_table *wait)
+static unsigned int mxc_poll(struct file *file, struct poll_table_struct *wait)
{
struct video_device *dev = video_devdata(file);
cam_data *cam = video_get_drvdata(dev);
@@ -2167,7 +2163,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,
@@ -2179,7 +2175,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,
};
diff --git a/drivers/media/video/mxc/capture/ov2640.c b/drivers/media/video/mxc/capture/ov2640.c
index a1329b0b431d..c906925eca21 100644
--- a/drivers/media/video/mxc/capture/ov2640.c
+++ b/drivers/media/video/mxc/capture/ov2640.c
@@ -28,6 +28,7 @@
#include <linux/i2c.h>
#include <linux/regulator/consumer.h>
+#include <mach/hardware.h>
#include <media/v4l2-int-device.h>
#include "mxc_v4l2_capture.h"
diff --git a/drivers/media/video/mxc/capture/ov3640.c b/drivers/media/video/mxc/capture/ov3640.c
index 3ff269dda924..ececb12bcc3e 100644
--- a/drivers/media/video/mxc/capture/ov3640.c
+++ b/drivers/media/video/mxc/capture/ov3640.c
@@ -19,6 +19,7 @@
#include <linux/device.h>
#include <linux/i2c.h>
#include <linux/regulator/consumer.h>
+#include <mach/hardware.h>
#include <media/v4l2-int-device.h>
#include "mxc_v4l2_capture.h"