aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2008-05-29 15:43:54 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:10:31 -0400
commit3f038d80039f60e4340eaedd13369e0d2c758b80 (patch)
tree994cafb1cb1900b97155b2d3233814632c856adc /drivers/media/video/ivtv/ivtv-driver.c
parent539a7555b31e65e66fb84c881d07d2bf18c974d0 (diff)
V4L/DVB (8079): ivtv: Convert to video_ioctl2.
Based on an initial conversion patch from Douglas Landgraf. Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-driver.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-driver.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtv-driver.c b/drivers/media/video/ivtv/ivtv-driver.c
index 323dd68fa1c6..9e6a64903875 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -1262,9 +1262,13 @@ err:
1262int ivtv_init_on_first_open(struct ivtv *itv) 1262int ivtv_init_on_first_open(struct ivtv *itv)
1263{ 1263{
1264 struct v4l2_frequency vf; 1264 struct v4l2_frequency vf;
1265 /* Needed to call ioctls later */
1266 struct ivtv_open_id fh;
1265 int fw_retry_count = 3; 1267 int fw_retry_count = 3;
1266 int video_input; 1268 int video_input;
1267 1269
1270 fh.itv = itv;
1271
1268 if (test_bit(IVTV_F_I_FAILED, &itv->i_flags)) 1272 if (test_bit(IVTV_F_I_FAILED, &itv->i_flags))
1269 return -ENXIO; 1273 return -ENXIO;
1270 1274
@@ -1312,18 +1316,18 @@ int ivtv_init_on_first_open(struct ivtv *itv)
1312 1316
1313 video_input = itv->active_input; 1317 video_input = itv->active_input;
1314 itv->active_input++; /* Force update of input */ 1318 itv->active_input++; /* Force update of input */
1315 ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_INPUT, &video_input); 1319 ivtv_s_input(NULL, &fh, video_input);
1316 1320
1317 /* Let the VIDIOC_S_STD ioctl do all the work, keeps the code 1321 /* Let the VIDIOC_S_STD ioctl do all the work, keeps the code
1318 in one place. */ 1322 in one place. */
1319 itv->std++; /* Force full standard initialization */ 1323 itv->std++; /* Force full standard initialization */
1320 itv->std_out = itv->std; 1324 itv->std_out = itv->std;
1321 ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_FREQUENCY, &vf); 1325 ivtv_s_frequency(NULL, &fh, &vf);
1322 1326
1323 if (itv->card->v4l2_capabilities & V4L2_CAP_VIDEO_OUTPUT) { 1327 if (itv->card->v4l2_capabilities & V4L2_CAP_VIDEO_OUTPUT) {
1324 ivtv_init_mpeg_decoder(itv); 1328 ivtv_init_mpeg_decoder(itv);
1325 } 1329 }
1326 ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_STD, &itv->tuner_std); 1330 ivtv_s_std(NULL, &fh, &itv->tuner_std);
1327 1331
1328 /* On a cx23416 this seems to be able to enable DMA to the chip? */ 1332 /* On a cx23416 this seems to be able to enable DMA to the chip? */
1329 if (!itv->has_cx23415) 1333 if (!itv->has_cx23415)