summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cafe_ccic.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-02-24 08:57:31 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-24 08:57:31 -0200
commit0c10299d80fe45160d3c79fd58634ae3b1c025db (patch)
treeacc45ce055f216abafdb9a9596b8403612deb3fe /linux/drivers/media/video/cafe_ccic.c
parent77e1106a1a76a4b429b21841bd1361f0e8fd5652 (diff)
parent2be3674b75c83865e9a131c6c54aaee005df47ed (diff)
downloadmediapointer-dvb-s2-0c10299d80fe45160d3c79fd58634ae3b1c025db.tar.gz
mediapointer-dvb-s2-0c10299d80fe45160d3c79fd58634ae3b1c025db.tar.bz2
merge: http://linuxtv.org/hg/~hverkuil/dvb-api
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cafe_ccic.c')
-rw-r--r--linux/drivers/media/video/cafe_ccic.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/linux/drivers/media/video/cafe_ccic.c b/linux/drivers/media/video/cafe_ccic.c
index a21d1b5b7..5f35836ad 100644
--- a/linux/drivers/media/video/cafe_ccic.c
+++ b/linux/drivers/media/video/cafe_ccic.c
@@ -23,6 +23,7 @@
#include <linux/videodev2.h>
#include "compat.h"
#include <media/v4l2-common.h>
+#include <media/v4l2-chip-ident.h>
#include <linux/device.h>
#include <linux/wait.h>
#include <linux/list.h>
@@ -165,7 +166,7 @@ struct cafe_camera
struct tasklet_struct s_tasklet;
/* Current operating parameters */
- enum v4l2_chip_ident sensor_type; /* Currently ov7670 only */
+ u32 sensor_type; /* Currently ov7670 only */
struct v4l2_pix_format pix_format;
/* Locks */
@@ -825,6 +826,7 @@ static int __cafe_cam_reset(struct cafe_camera *cam)
*/
static int cafe_cam_init(struct cafe_camera *cam)
{
+ struct v4l2_chip_ident chip = { V4L2_CHIP_MATCH_ALWAYS };
int ret;
mutex_lock(&cam->s_mutex);
@@ -834,9 +836,10 @@ static int cafe_cam_init(struct cafe_camera *cam)
ret = __cafe_cam_reset(cam);
if (ret)
goto out;
- ret = __cafe_cam_cmd(cam, VIDIOC_INT_G_CHIP_IDENT, &cam->sensor_type);
+ ret = __cafe_cam_cmd(cam, VIDIOC_G_CHIP_IDENT, &chip);
if (ret)
goto out;
+ cam->sensor_type = chip.ident;
// if (cam->sensor->addr != OV7xx0_SID) {
if (cam->sensor_type != V4L2_IDENT_OV7670) {
cam_err(cam, "Unsupported sensor type %d", cam->sensor->addr);