diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-30 03:08:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-30 03:08:53 -0400 |
commit | 664a41b8a91bf78a01a751e15175e0008977685a (patch) | |
tree | d9dc15c83400ad2dfb430ff27ae3e7fdc9395856 /drivers/media/video/ivtv/ivtv-fileops.c | |
parent | 983236b5741e557451f3ed4ec5ebf1f62a5b2c15 (diff) | |
parent | ee2ce3a0b43d14d792d34cf88e7bc2091096744b (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (430 commits)
[media] ir-mce_kbd-decoder: include module.h for its facilities
[media] ov5642: include module.h for its facilities
[media] em28xx: Fix DVB-C maxsize for em2884
[media] tda18271c2dd: Fix saw filter configuration for DVB-C @6MHz
[media] v4l: mt9v032: Fix Bayer pattern
[media] V4L: mt9m111: rewrite set_pixfmt
[media] V4L: mt9m111: fix missing return value check mt9m111_reg_clear
[media] V4L: initial driver for ov5642 CMOS sensor
[media] V4L: sh_mobile_ceu_camera: fix Oops when USERPTR mapping fails
[media] V4L: soc-camera: remove soc-camera bus and devices on it
[media] V4L: soc-camera: un-export the soc-camera bus
[media] V4L: sh_mobile_csi2: switch away from using the soc-camera bus notifier
[media] V4L: add media bus configuration subdev operations
[media] V4L: soc-camera: group struct field initialisations together
[media] V4L: soc-camera: remove now unused soc-camera specific PM hooks
[media] V4L: pxa-camera: switch to using standard PM hooks
[media] NetUP Dual DVB-T/C CI RF: force card hardware revision by module param
[media] Don't OOPS if videobuf_dvb_get_frontend return NULL
[media] NetUP Dual DVB-T/C CI RF: load firmware according card revision
[media] omap3isp: Support configurable HS/VS polarities
...
Fix up conflicts:
- arch/arm/mach-omap2/board-rx51-peripherals.c:
cleanup regulator supply definitions in mach-omap2
vs
OMAP3: RX-51: define vdds_csib regulator supply
- drivers/staging/tm6000/tm6000-alsa.c (trivial)
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-fileops.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-fileops.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/media/video/ivtv/ivtv-fileops.c b/drivers/media/video/ivtv/ivtv-fileops.c index a7f54b010a5c..38f052257f46 100644 --- a/drivers/media/video/ivtv/ivtv-fileops.c +++ b/drivers/media/video/ivtv/ivtv-fileops.c | |||
@@ -722,8 +722,8 @@ unsigned int ivtv_v4l2_dec_poll(struct file *filp, poll_table *wait) | |||
722 | 722 | ||
723 | /* If there are subscribed events, then only use the new event | 723 | /* If there are subscribed events, then only use the new event |
724 | API instead of the old video.h based API. */ | 724 | API instead of the old video.h based API. */ |
725 | if (!list_empty(&id->fh.events->subscribed)) { | 725 | if (!list_empty(&id->fh.subscribed)) { |
726 | poll_wait(filp, &id->fh.events->wait, wait); | 726 | poll_wait(filp, &id->fh.wait, wait); |
727 | /* Turn off the old-style vsync events */ | 727 | /* Turn off the old-style vsync events */ |
728 | clear_bit(IVTV_F_I_EV_VSYNC_ENABLED, &itv->i_flags); | 728 | clear_bit(IVTV_F_I_EV_VSYNC_ENABLED, &itv->i_flags); |
729 | if (v4l2_event_pending(&id->fh)) | 729 | if (v4l2_event_pending(&id->fh)) |
@@ -750,6 +750,7 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait) | |||
750 | struct ivtv *itv = id->itv; | 750 | struct ivtv *itv = id->itv; |
751 | struct ivtv_stream *s = &itv->streams[id->type]; | 751 | struct ivtv_stream *s = &itv->streams[id->type]; |
752 | int eof = test_bit(IVTV_F_S_STREAMOFF, &s->s_flags); | 752 | int eof = test_bit(IVTV_F_S_STREAMOFF, &s->s_flags); |
753 | unsigned res = 0; | ||
753 | 754 | ||
754 | /* Start a capture if there is none */ | 755 | /* Start a capture if there is none */ |
755 | if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags)) { | 756 | if (!eof && !test_bit(IVTV_F_S_STREAMING, &s->s_flags)) { |
@@ -769,12 +770,16 @@ unsigned int ivtv_v4l2_enc_poll(struct file *filp, poll_table * wait) | |||
769 | /* add stream's waitq to the poll list */ | 770 | /* add stream's waitq to the poll list */ |
770 | IVTV_DEBUG_HI_FILE("Encoder poll\n"); | 771 | IVTV_DEBUG_HI_FILE("Encoder poll\n"); |
771 | poll_wait(filp, &s->waitq, wait); | 772 | poll_wait(filp, &s->waitq, wait); |
773 | if (v4l2_event_pending(&id->fh)) | ||
774 | res |= POLLPRI; | ||
775 | else | ||
776 | poll_wait(filp, &id->fh.wait, wait); | ||
772 | 777 | ||
773 | if (s->q_full.length || s->q_io.length) | 778 | if (s->q_full.length || s->q_io.length) |
774 | return POLLIN | POLLRDNORM; | 779 | return res | POLLIN | POLLRDNORM; |
775 | if (eof) | 780 | if (eof) |
776 | return POLLHUP; | 781 | return res | POLLHUP; |
777 | return 0; | 782 | return res; |
778 | } | 783 | } |
779 | 784 | ||
780 | void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end) | 785 | void ivtv_stop_capture(struct ivtv_open_id *id, int gop_end) |
@@ -961,10 +966,6 @@ static int ivtv_serialized_open(struct ivtv_stream *s, struct file *filp) | |||
961 | return -ENOMEM; | 966 | return -ENOMEM; |
962 | } | 967 | } |
963 | v4l2_fh_init(&item->fh, s->vdev); | 968 | v4l2_fh_init(&item->fh, s->vdev); |
964 | if (s->type == IVTV_DEC_STREAM_TYPE_YUV || | ||
965 | s->type == IVTV_DEC_STREAM_TYPE_MPG) { | ||
966 | res = v4l2_event_alloc(&item->fh, 60); | ||
967 | } | ||
968 | if (res < 0) { | 969 | if (res < 0) { |
969 | v4l2_fh_exit(&item->fh); | 970 | v4l2_fh_exit(&item->fh); |
970 | kfree(item); | 971 | kfree(item); |