[PATCH] msm_camera, msm_v4l2 and msm_vfe7x(camera sensor): make it compile(still oops at runtime)
Denis 'GNUtoo' Carikli
GNUtoo at no-log.org
Sat Jan 30 23:56:54 UTC 2010
msm_vfe7x.c and msm_camera lacked the linux/sched.h include so I added it
Else it would fail to compile because TASK_NORMAL and TASK_UNINTERRUPTIBLE are
undeclared
I also changed VID_TYPE_CAPTURE into V4L2_CAP_VIDEO_CAPTURE because:
*even if including videodev2.h was correct,it didn't resolve VID_TYPE_CAPTURE
So I went to look at VID_TYPE_CAPTURE in videodev2.h and just before it I saw that:
These defines are V4L1 specific and should not be used with the V4L2 API!
They will be removed from this header in the future.
So I updated it with V4L2_CAP_VIDEO_CAPTURE because of that:
/* Values for 'capabilities' field */
#define V4L2_CAP_VIDEO_CAPTURE 0x00000001 /* Is a video capture device */
Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo at no-log.org>
---
drivers/media/video/msm/msm_camera.c | 1 +
drivers/media/video/msm/msm_v4l2.c | 2 +-
drivers/media/video/msm/msm_vfe7x.c | 1 +
3 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/media/video/msm/msm_camera.c b/drivers/media/video/msm/msm_camera.c
index 580922f..6e1925e 100644
--- a/drivers/media/video/msm/msm_camera.c
+++ b/drivers/media/video/msm/msm_camera.c
@@ -32,6 +32,7 @@
#include <linux/uaccess.h>
#include <linux/android_pmem.h>
#include <linux/poll.h>
+#include <linux/sched.h>
#include <media/msm_camera.h>
#include <mach/camera.h>
diff --git a/drivers/media/video/msm/msm_v4l2.c b/drivers/media/video/msm/msm_v4l2.c
index e55028f..0a3b157 100644
--- a/drivers/media/video/msm/msm_v4l2.c
+++ b/drivers/media/video/msm/msm_v4l2.c
@@ -705,7 +705,7 @@ static const struct v4l2_ioctl_ops msm_ioctl_ops = {
static int msm_v4l2_video_dev_init(struct video_device *pvd)
{
strncpy(pvd->name, MSM_APPS_ID_V4L2, sizeof(pvd->name));
- pvd->vfl_type = VID_TYPE_CAPTURE;
+ pvd->vfl_type = V4L2_CAP_VIDEO_CAPTURE;
pvd->fops = &msm_v4l2_fops;
pvd->release = msm_v4l2_release_dev;
pvd->minor = -1;
diff --git a/drivers/media/video/msm/msm_vfe7x.c b/drivers/media/video/msm/msm_vfe7x.c
index 45e02cf..ada9721 100644
--- a/drivers/media/video/msm/msm_vfe7x.c
+++ b/drivers/media/video/msm/msm_vfe7x.c
@@ -23,6 +23,7 @@
#include <mach/msm_adsp.h>
#include <linux/delay.h>
#include <linux/wait.h>
+#include <linux/sched.h>
#include "msm_vfe7x.h"
#define QDSP_CMDQUEUE QDSP_vfeCommandQueue
--
1.6.0.4
More information about the Replicant
mailing list