diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2014-04-28 15:53:01 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-24 16:11:26 -0400 |
commit | 8774bed9ce832d8d9ccb79e92800b808aa2d2ad2 (patch) | |
tree | 30756d116a47317fff754ca0f976cf5134033756 /drivers/media/pci | |
parent | 85ada737b9d9ede7dbb17e831d3b4bb187dc1915 (diff) |
[media] v4l: subdev: Move [gs]_std operation to video ops
The g_std and s_std operations are video-related, move them to the video
ops where they belong.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/bt8xx/bttv-driver.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx18/cx18-av-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx18/cx18-fileops.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx18/cx18-gpio.c | 6 | ||||
-rw-r--r-- | drivers/media/pci/cx18/cx18-ioctl.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/cx23885/cx23885-video.c | 4 | ||||
-rw-r--r-- | drivers/media/pci/cx88/cx88-core.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-fileops.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/ivtv/ivtv-ioctl.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-video.c | 4 | ||||
-rw-r--r-- | drivers/media/pci/saa7146/mxb.c | 14 | ||||
-rw-r--r-- | drivers/media/pci/sta2x11/sta2x11_vip.c | 4 | ||||
-rw-r--r-- | drivers/media/pci/zoran/zoran_device.c | 2 | ||||
-rw-r--r-- | drivers/media/pci/zoran/zoran_driver.c | 2 |
14 files changed, 27 insertions, 23 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index afcd53bfcf8e..da780f42b121 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
@@ -1182,7 +1182,7 @@ set_tvnorm(struct bttv *btv, unsigned int norm) | |||
1182 | break; | 1182 | break; |
1183 | } | 1183 | } |
1184 | id = tvnorm->v4l2_id; | 1184 | id = tvnorm->v4l2_id; |
1185 | bttv_call_all(btv, core, s_std, id); | 1185 | bttv_call_all(btv, video, s_std, id); |
1186 | 1186 | ||
1187 | return 0; | 1187 | return 0; |
1188 | } | 1188 | } |
diff --git a/drivers/media/pci/cx18/cx18-av-core.c b/drivers/media/pci/cx18/cx18-av-core.c index c4890a430dc6..2d3afe0431a9 100644 --- a/drivers/media/pci/cx18/cx18-av-core.c +++ b/drivers/media/pci/cx18/cx18-av-core.c | |||
@@ -1263,7 +1263,6 @@ static const struct v4l2_subdev_core_ops cx18_av_general_ops = { | |||
1263 | .log_status = cx18_av_log_status, | 1263 | .log_status = cx18_av_log_status, |
1264 | .load_fw = cx18_av_load_fw, | 1264 | .load_fw = cx18_av_load_fw, |
1265 | .reset = cx18_av_reset, | 1265 | .reset = cx18_av_reset, |
1266 | .s_std = cx18_av_s_std, | ||
1267 | #ifdef CONFIG_VIDEO_ADV_DEBUG | 1266 | #ifdef CONFIG_VIDEO_ADV_DEBUG |
1268 | .g_register = cx18_av_g_register, | 1267 | .g_register = cx18_av_g_register, |
1269 | .s_register = cx18_av_s_register, | 1268 | .s_register = cx18_av_s_register, |
@@ -1283,6 +1282,7 @@ static const struct v4l2_subdev_audio_ops cx18_av_audio_ops = { | |||
1283 | }; | 1282 | }; |
1284 | 1283 | ||
1285 | static const struct v4l2_subdev_video_ops cx18_av_video_ops = { | 1284 | static const struct v4l2_subdev_video_ops cx18_av_video_ops = { |
1285 | .s_std = cx18_av_s_std, | ||
1286 | .s_routing = cx18_av_s_video_routing, | 1286 | .s_routing = cx18_av_s_video_routing, |
1287 | .s_stream = cx18_av_s_stream, | 1287 | .s_stream = cx18_av_s_stream, |
1288 | .s_mbus_fmt = cx18_av_s_mbus_fmt, | 1288 | .s_mbus_fmt = cx18_av_s_mbus_fmt, |
diff --git a/drivers/media/pci/cx18/cx18-fileops.c b/drivers/media/pci/cx18/cx18-fileops.c index 4bfd865a4106..76a3b4ac541e 100644 --- a/drivers/media/pci/cx18/cx18-fileops.c +++ b/drivers/media/pci/cx18/cx18-fileops.c | |||
@@ -760,7 +760,7 @@ int cx18_v4l2_close(struct file *filp) | |||
760 | /* Mark that the radio is no longer in use */ | 760 | /* Mark that the radio is no longer in use */ |
761 | clear_bit(CX18_F_I_RADIO_USER, &cx->i_flags); | 761 | clear_bit(CX18_F_I_RADIO_USER, &cx->i_flags); |
762 | /* Switch tuner to TV */ | 762 | /* Switch tuner to TV */ |
763 | cx18_call_all(cx, core, s_std, cx->std); | 763 | cx18_call_all(cx, video, s_std, cx->std); |
764 | /* Select correct audio input (i.e. TV tuner or Line in) */ | 764 | /* Select correct audio input (i.e. TV tuner or Line in) */ |
765 | cx18_audio_set_io(cx); | 765 | cx18_audio_set_io(cx); |
766 | if (atomic_read(&cx->ana_capturing) > 0) { | 766 | if (atomic_read(&cx->ana_capturing) > 0) { |
diff --git a/drivers/media/pci/cx18/cx18-gpio.c b/drivers/media/pci/cx18/cx18-gpio.c index 5374aeb0cd22..38dc6b8f8254 100644 --- a/drivers/media/pci/cx18/cx18-gpio.c +++ b/drivers/media/pci/cx18/cx18-gpio.c | |||
@@ -180,7 +180,6 @@ static int gpiomux_s_audio_routing(struct v4l2_subdev *sd, | |||
180 | 180 | ||
181 | static const struct v4l2_subdev_core_ops gpiomux_core_ops = { | 181 | static const struct v4l2_subdev_core_ops gpiomux_core_ops = { |
182 | .log_status = gpiomux_log_status, | 182 | .log_status = gpiomux_log_status, |
183 | .s_std = gpiomux_s_std, | ||
184 | }; | 183 | }; |
185 | 184 | ||
186 | static const struct v4l2_subdev_tuner_ops gpiomux_tuner_ops = { | 185 | static const struct v4l2_subdev_tuner_ops gpiomux_tuner_ops = { |
@@ -191,10 +190,15 @@ static const struct v4l2_subdev_audio_ops gpiomux_audio_ops = { | |||
191 | .s_routing = gpiomux_s_audio_routing, | 190 | .s_routing = gpiomux_s_audio_routing, |
192 | }; | 191 | }; |
193 | 192 | ||
193 | static const struct v4l2_subdev_video_ops gpiomux_video_ops = { | ||
194 | .s_std = gpiomux_s_std, | ||
195 | }; | ||
196 | |||
194 | static const struct v4l2_subdev_ops gpiomux_ops = { | 197 | static const struct v4l2_subdev_ops gpiomux_ops = { |
195 | .core = &gpiomux_core_ops, | 198 | .core = &gpiomux_core_ops, |
196 | .tuner = &gpiomux_tuner_ops, | 199 | .tuner = &gpiomux_tuner_ops, |
197 | .audio = &gpiomux_audio_ops, | 200 | .audio = &gpiomux_audio_ops, |
201 | .video = &gpiomux_video_ops, | ||
198 | }; | 202 | }; |
199 | 203 | ||
200 | /* | 204 | /* |
diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c index 1110bcb14e2f..fefb2cd35838 100644 --- a/drivers/media/pci/cx18/cx18-ioctl.c +++ b/drivers/media/pci/cx18/cx18-ioctl.c | |||
@@ -602,7 +602,7 @@ int cx18_s_std(struct file *file, void *fh, v4l2_std_id std) | |||
602 | (unsigned long long) cx->std); | 602 | (unsigned long long) cx->std); |
603 | 603 | ||
604 | /* Tuner */ | 604 | /* Tuner */ |
605 | cx18_call_all(cx, core, s_std, cx->std); | 605 | cx18_call_all(cx, video, s_std, cx->std); |
606 | return 0; | 606 | return 0; |
607 | } | 607 | } |
608 | 608 | ||
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 7891f34157d1..e0a59523cf3c 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c | |||
@@ -326,7 +326,7 @@ int cx23885_set_tvnorm(struct cx23885_dev *dev, v4l2_std_id norm) | |||
326 | 326 | ||
327 | dev->tvnorm = norm; | 327 | dev->tvnorm = norm; |
328 | 328 | ||
329 | call_all(dev, core, s_std, norm); | 329 | call_all(dev, video, s_std, norm); |
330 | 330 | ||
331 | return 0; | 331 | return 0; |
332 | } | 332 | } |
@@ -1589,7 +1589,7 @@ static int cx23885_set_freq_via_ops(struct cx23885_dev *dev, | |||
1589 | fe = &dev->ts1.analog_fe; | 1589 | fe = &dev->ts1.analog_fe; |
1590 | 1590 | ||
1591 | if (fe && fe->ops.tuner_ops.set_analog_params) { | 1591 | if (fe && fe->ops.tuner_ops.set_analog_params) { |
1592 | call_all(dev, core, s_std, dev->tvnorm); | 1592 | call_all(dev, video, s_std, dev->tvnorm); |
1593 | fe->ops.tuner_ops.set_analog_params(fe, ¶ms); | 1593 | fe->ops.tuner_ops.set_analog_params(fe, ¶ms); |
1594 | } | 1594 | } |
1595 | else | 1595 | else |
diff --git a/drivers/media/pci/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c index ad59dc9235ae..e061c88b697e 100644 --- a/drivers/media/pci/cx88/cx88-core.c +++ b/drivers/media/pci/cx88/cx88-core.c | |||
@@ -1012,7 +1012,7 @@ int cx88_set_tvnorm(struct cx88_core *core, v4l2_std_id norm) | |||
1012 | set_tvaudio(core); | 1012 | set_tvaudio(core); |
1013 | 1013 | ||
1014 | // tell i2c chips | 1014 | // tell i2c chips |
1015 | call_all(core, core, s_std, norm); | 1015 | call_all(core, video, s_std, norm); |
1016 | 1016 | ||
1017 | /* The chroma_agc control should be inaccessible if the video format is SECAM */ | 1017 | /* The chroma_agc control should be inaccessible if the video format is SECAM */ |
1018 | v4l2_ctrl_grab(core->chroma_agc, cxiformat == VideoFormatSECAM); | 1018 | v4l2_ctrl_grab(core->chroma_agc, cxiformat == VideoFormatSECAM); |
diff --git a/drivers/media/pci/ivtv/ivtv-fileops.c b/drivers/media/pci/ivtv/ivtv-fileops.c index 9caffd8aa995..e5ff6277ca85 100644 --- a/drivers/media/pci/ivtv/ivtv-fileops.c +++ b/drivers/media/pci/ivtv/ivtv-fileops.c | |||
@@ -894,7 +894,7 @@ int ivtv_v4l2_close(struct file *filp) | |||
894 | /* Mark that the radio is no longer in use */ | 894 | /* Mark that the radio is no longer in use */ |
895 | clear_bit(IVTV_F_I_RADIO_USER, &itv->i_flags); | 895 | clear_bit(IVTV_F_I_RADIO_USER, &itv->i_flags); |
896 | /* Switch tuner to TV */ | 896 | /* Switch tuner to TV */ |
897 | ivtv_call_all(itv, core, s_std, itv->std); | 897 | ivtv_call_all(itv, video, s_std, itv->std); |
898 | /* Select correct audio input (i.e. TV tuner or Line in) */ | 898 | /* Select correct audio input (i.e. TV tuner or Line in) */ |
899 | ivtv_audio_set_io(itv); | 899 | ivtv_audio_set_io(itv); |
900 | if (itv->hw_flags & IVTV_HW_SAA711X) { | 900 | if (itv->hw_flags & IVTV_HW_SAA711X) { |
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c index 807b275a847e..b3667a00db3a 100644 --- a/drivers/media/pci/ivtv/ivtv-ioctl.c +++ b/drivers/media/pci/ivtv/ivtv-ioctl.c | |||
@@ -1090,7 +1090,7 @@ void ivtv_s_std_enc(struct ivtv *itv, v4l2_std_id std) | |||
1090 | itv->vbi.sliced_decoder_line_size = itv->is_60hz ? 272 : 284; | 1090 | itv->vbi.sliced_decoder_line_size = itv->is_60hz ? 272 : 284; |
1091 | 1091 | ||
1092 | /* Tuner */ | 1092 | /* Tuner */ |
1093 | ivtv_call_all(itv, core, s_std, itv->std); | 1093 | ivtv_call_all(itv, video, s_std, itv->std); |
1094 | } | 1094 | } |
1095 | 1095 | ||
1096 | void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id std) | 1096 | void ivtv_s_std_dec(struct ivtv *itv, v4l2_std_id std) |
diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index f1452da0a76d..d37599980768 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c | |||
@@ -477,10 +477,10 @@ void saa7134_set_tvnorm_hw(struct saa7134_dev *dev) | |||
477 | saa7134_set_decoder(dev); | 477 | saa7134_set_decoder(dev); |
478 | 478 | ||
479 | if (card_in(dev, dev->ctl_input).tv) | 479 | if (card_in(dev, dev->ctl_input).tv) |
480 | saa_call_all(dev, core, s_std, dev->tvnorm->id); | 480 | saa_call_all(dev, video, s_std, dev->tvnorm->id); |
481 | /* Set the correct norm for the saa6752hs. This function | 481 | /* Set the correct norm for the saa6752hs. This function |
482 | does nothing if there is no saa6752hs. */ | 482 | does nothing if there is no saa6752hs. */ |
483 | saa_call_empress(dev, core, s_std, dev->tvnorm->id); | 483 | saa_call_empress(dev, video, s_std, dev->tvnorm->id); |
484 | } | 484 | } |
485 | 485 | ||
486 | static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) | 486 | static void set_h_prescale(struct saa7134_dev *dev, int task, int prescale) |
diff --git a/drivers/media/pci/saa7146/mxb.c b/drivers/media/pci/saa7146/mxb.c index 33abe332d175..c4c8fce8f2b4 100644 --- a/drivers/media/pci/saa7146/mxb.c +++ b/drivers/media/pci/saa7146/mxb.c | |||
@@ -357,7 +357,7 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
357 | tea6420_route(mxb, 6); | 357 | tea6420_route(mxb, 6); |
358 | 358 | ||
359 | /* select video mode in saa7111a */ | 359 | /* select video mode in saa7111a */ |
360 | saa7111a_call(mxb, core, s_std, std); | 360 | saa7111a_call(mxb, video, s_std, std); |
361 | 361 | ||
362 | /* select tuner-output on saa7111a */ | 362 | /* select tuner-output on saa7111a */ |
363 | i = 0; | 363 | i = 0; |
@@ -379,8 +379,8 @@ static int mxb_init_done(struct saa7146_dev* dev) | |||
379 | /* These two gpio calls set the GPIO pins that control the tda9820 */ | 379 | /* These two gpio calls set the GPIO pins that control the tda9820 */ |
380 | saa7146_write(dev, GPIO_CTRL, 0x00404050); | 380 | saa7146_write(dev, GPIO_CTRL, 0x00404050); |
381 | saa7111a_call(mxb, core, s_gpio, 1); | 381 | saa7111a_call(mxb, core, s_gpio, 1); |
382 | saa7111a_call(mxb, core, s_std, std); | 382 | saa7111a_call(mxb, video, s_std, std); |
383 | tuner_call(mxb, core, s_std, std); | 383 | tuner_call(mxb, video, s_std, std); |
384 | 384 | ||
385 | /* switch to tuner-channel on tea6415c */ | 385 | /* switch to tuner-channel on tea6415c */ |
386 | tea6415c_call(mxb, video, s_routing, 3, 17, 0); | 386 | tea6415c_call(mxb, video, s_routing, 3, 17, 0); |
@@ -771,9 +771,9 @@ static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standa | |||
771 | /* These two gpio calls set the GPIO pins that control the tda9820 */ | 771 | /* These two gpio calls set the GPIO pins that control the tda9820 */ |
772 | saa7146_write(dev, GPIO_CTRL, 0x00404050); | 772 | saa7146_write(dev, GPIO_CTRL, 0x00404050); |
773 | saa7111a_call(mxb, core, s_gpio, 0); | 773 | saa7111a_call(mxb, core, s_gpio, 0); |
774 | saa7111a_call(mxb, core, s_std, std); | 774 | saa7111a_call(mxb, video, s_std, std); |
775 | if (mxb->cur_input == 0) | 775 | if (mxb->cur_input == 0) |
776 | tuner_call(mxb, core, s_std, std); | 776 | tuner_call(mxb, video, s_std, std); |
777 | } else { | 777 | } else { |
778 | v4l2_std_id std = V4L2_STD_PAL_BG; | 778 | v4l2_std_id std = V4L2_STD_PAL_BG; |
779 | 779 | ||
@@ -783,9 +783,9 @@ static int std_callback(struct saa7146_dev *dev, struct saa7146_standard *standa | |||
783 | /* These two gpio calls set the GPIO pins that control the tda9820 */ | 783 | /* These two gpio calls set the GPIO pins that control the tda9820 */ |
784 | saa7146_write(dev, GPIO_CTRL, 0x00404050); | 784 | saa7146_write(dev, GPIO_CTRL, 0x00404050); |
785 | saa7111a_call(mxb, core, s_gpio, 1); | 785 | saa7111a_call(mxb, core, s_gpio, 1); |
786 | saa7111a_call(mxb, core, s_std, std); | 786 | saa7111a_call(mxb, video, s_std, std); |
787 | if (mxb->cur_input == 0) | 787 | if (mxb->cur_input == 0) |
788 | tuner_call(mxb, core, s_std, std); | 788 | tuner_call(mxb, video, s_std, std); |
789 | } | 789 | } |
790 | return 0; | 790 | return 0; |
791 | } | 791 | } |
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index 7559951b2ea4..d2abd3b5c2bf 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c | |||
@@ -444,7 +444,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id std) | |||
444 | int status; | 444 | int status; |
445 | 445 | ||
446 | if (V4L2_STD_ALL == std) { | 446 | if (V4L2_STD_ALL == std) { |
447 | v4l2_subdev_call(vip->decoder, core, s_std, std); | 447 | v4l2_subdev_call(vip->decoder, video, s_std, std); |
448 | ssleep(2); | 448 | ssleep(2); |
449 | v4l2_subdev_call(vip->decoder, video, querystd, &newstd); | 449 | v4l2_subdev_call(vip->decoder, video, querystd, &newstd); |
450 | v4l2_subdev_call(vip->decoder, video, g_input_status, &status); | 450 | v4l2_subdev_call(vip->decoder, video, g_input_status, &status); |
@@ -467,7 +467,7 @@ static int vidioc_s_std(struct file *file, void *priv, v4l2_std_id std) | |||
467 | vip->format = formats_50[0]; | 467 | vip->format = formats_50[0]; |
468 | } | 468 | } |
469 | 469 | ||
470 | return v4l2_subdev_call(vip->decoder, core, s_std, std); | 470 | return v4l2_subdev_call(vip->decoder, video, s_std, std); |
471 | } | 471 | } |
472 | 472 | ||
473 | /** | 473 | /** |
diff --git a/drivers/media/pci/zoran/zoran_device.c b/drivers/media/pci/zoran/zoran_device.c index 519164c572c8..bf34b93f23ee 100644 --- a/drivers/media/pci/zoran/zoran_device.c +++ b/drivers/media/pci/zoran/zoran_device.c | |||
@@ -1572,7 +1572,7 @@ zoran_init_hardware (struct zoran *zr) | |||
1572 | } | 1572 | } |
1573 | 1573 | ||
1574 | decoder_call(zr, core, init, 0); | 1574 | decoder_call(zr, core, init, 0); |
1575 | decoder_call(zr, core, s_std, zr->norm); | 1575 | decoder_call(zr, video, s_std, zr->norm); |
1576 | decoder_call(zr, video, s_routing, | 1576 | decoder_call(zr, video, s_routing, |
1577 | zr->card.input[zr->input].muxsel, 0, 0); | 1577 | zr->card.input[zr->input].muxsel, 0, 0); |
1578 | 1578 | ||
diff --git a/drivers/media/pci/zoran/zoran_driver.c b/drivers/media/pci/zoran/zoran_driver.c index e7e9840c6c35..099d5fbebb7c 100644 --- a/drivers/media/pci/zoran/zoran_driver.c +++ b/drivers/media/pci/zoran/zoran_driver.c | |||
@@ -1469,7 +1469,7 @@ zoran_set_norm (struct zoran *zr, | |||
1469 | if (on) | 1469 | if (on) |
1470 | zr36057_overlay(zr, 0); | 1470 | zr36057_overlay(zr, 0); |
1471 | 1471 | ||
1472 | decoder_call(zr, core, s_std, norm); | 1472 | decoder_call(zr, video, s_std, norm); |
1473 | encoder_call(zr, video, s_std_output, norm); | 1473 | encoder_call(zr, video, s_std_output, norm); |
1474 | 1474 | ||
1475 | if (on) | 1475 | if (on) |