From: Gustavo Padovan <gustavo@padovan.org>
To: linux-media@vger.kernel.org
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Mauro Carvalho Chehab <mchehab@osg.samsung.com>,
Shuah Khan <shuahkh@osg.samsung.com>,
Pawel Osciak <pawel@osciak.com>,
Alexandre Courbot <acourbot@chromium.org>,
Sakari Ailus <sakari.ailus@iki.fi>,
Brian Starkey <brian.starkey@arm.com>,
linux-kernel@vger.kernel.org,
Gustavo Padovan <gustavo.padovan@collabora.com>
Subject: [RFC v4 03/17] [media] v4l: use v4l2_subscribe_event_v4l2() on drivers
Date: Fri, 20 Oct 2017 19:49:58 -0200 [thread overview]
Message-ID: <20171020215012.20646-4-gustavo@padovan.org> (raw)
In-Reply-To: <20171020215012.20646-1-gustavo@padovan.org>
From: Gustavo Padovan <gustavo.padovan@collabora.com>
Driver that implement their own .vidioc_subscribe_event function should
be using v4l2_subscribe_event_v4l2() instead of
v4l2_ctrl_subscribe_event().
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.com>
---
drivers/media/pci/cobalt/cobalt-v4l2.c | 2 +-
drivers/media/pci/ivtv/ivtv-ioctl.c | 2 +-
drivers/media/pci/tw5864/tw5864-video.c | 2 +-
drivers/media/platform/coda/coda-common.c | 2 +-
drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c | 2 +-
drivers/media/platform/qcom/venus/vdec.c | 4 +---
drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +-
drivers/media/platform/vivid/vivid-vid-out.c | 2 +-
drivers/media/usb/go7007/go7007-v4l2.c | 2 +-
drivers/media/usb/uvc/uvc_v4l2.c | 2 +-
10 files changed, 10 insertions(+), 12 deletions(-)
diff --git a/drivers/media/pci/cobalt/cobalt-v4l2.c b/drivers/media/pci/cobalt/cobalt-v4l2.c
index def4a3b37084..7b79daa09416 100644
--- a/drivers/media/pci/cobalt/cobalt-v4l2.c
+++ b/drivers/media/pci/cobalt/cobalt-v4l2.c
@@ -1071,7 +1071,7 @@ static int cobalt_subscribe_event(struct v4l2_fh *fh,
case V4L2_EVENT_SOURCE_CHANGE:
return v4l2_event_subscribe(fh, sub, 4, NULL);
}
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
static int cobalt_g_parm(struct file *file, void *fh, struct v4l2_streamparm *a)
diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
index 670462d195b5..4d76a433fcf3 100644
--- a/drivers/media/pci/ivtv/ivtv-ioctl.c
+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
@@ -1507,7 +1507,7 @@ static int ivtv_subscribe_event(struct v4l2_fh *fh, const struct v4l2_event_subs
case V4L2_EVENT_EOS:
return v4l2_event_subscribe(fh, sub, 0, NULL);
default:
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
}
diff --git a/drivers/media/pci/tw5864/tw5864-video.c b/drivers/media/pci/tw5864/tw5864-video.c
index e7bd2b8484e3..67fa883bed3c 100644
--- a/drivers/media/pci/tw5864/tw5864-video.c
+++ b/drivers/media/pci/tw5864/tw5864-video.c
@@ -671,7 +671,7 @@ static int tw5864_subscribe_event(struct v4l2_fh *fh,
*/
return v4l2_event_subscribe(fh, sub, 30, NULL);
default:
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
}
diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c
index 15eb5dc4dff9..897c6939ab0f 100644
--- a/drivers/media/platform/coda/coda-common.c
+++ b/drivers/media/platform/coda/coda-common.c
@@ -1085,7 +1085,7 @@ static int coda_subscribe_event(struct v4l2_fh *fh,
case V4L2_EVENT_EOS:
return v4l2_event_subscribe(fh, sub, 0, NULL);
default:
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
}
diff --git a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
index 843510979ad8..a9f80db14b47 100644
--- a/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
+++ b/drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c
@@ -629,7 +629,7 @@ static int vidioc_vdec_subscribe_evt(struct v4l2_fh *fh,
case V4L2_EVENT_SOURCE_CHANGE:
return v4l2_src_change_event_subscribe(fh, sub);
default:
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
}
diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c
index da611a5eb670..ccf9b778dcf9 100644
--- a/drivers/media/platform/qcom/venus/vdec.c
+++ b/drivers/media/platform/qcom/venus/vdec.c
@@ -459,10 +459,8 @@ static int vdec_subscribe_event(struct v4l2_fh *fh,
return v4l2_event_subscribe(fh, sub, 2, NULL);
case V4L2_EVENT_SOURCE_CHANGE:
return v4l2_src_change_event_subscribe(fh, sub);
- case V4L2_EVENT_CTRL:
- return v4l2_ctrl_subscribe_event(fh, sub);
default:
- return -EINVAL;
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
}
diff --git a/drivers/media/platform/rcar-vin/rcar-v4l2.c b/drivers/media/platform/rcar-vin/rcar-v4l2.c
index dd37ea811680..153622e0d42f 100644
--- a/drivers/media/platform/rcar-vin/rcar-v4l2.c
+++ b/drivers/media/platform/rcar-vin/rcar-v4l2.c
@@ -542,7 +542,7 @@ static int rvin_subscribe_event(struct v4l2_fh *fh,
case V4L2_EVENT_SOURCE_CHANGE:
return v4l2_event_subscribe(fh, sub, 4, NULL);
}
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
static int rvin_enum_dv_timings(struct file *file, void *priv_fh,
diff --git a/drivers/media/platform/vivid/vivid-vid-out.c b/drivers/media/platform/vivid/vivid-vid-out.c
index 0b1b6218ede8..f420e9c9d1f6 100644
--- a/drivers/media/platform/vivid/vivid-vid-out.c
+++ b/drivers/media/platform/vivid/vivid-vid-out.c
@@ -1183,7 +1183,7 @@ int vidioc_subscribe_event(struct v4l2_fh *fh,
return v4l2_src_change_event_subscribe(fh, sub);
break;
default:
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
return -EINVAL;
}
diff --git a/drivers/media/usb/go7007/go7007-v4l2.c b/drivers/media/usb/go7007/go7007-v4l2.c
index 98cd57eaf36a..a0343a4b4dbc 100644
--- a/drivers/media/usb/go7007/go7007-v4l2.c
+++ b/drivers/media/usb/go7007/go7007-v4l2.c
@@ -797,7 +797,7 @@ static int vidioc_subscribe_event(struct v4l2_fh *fh,
* stored. */
return v4l2_event_subscribe(fh, sub, 30, NULL);
default:
- return v4l2_ctrl_subscribe_event(fh, sub);
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
}
diff --git a/drivers/media/usb/uvc/uvc_v4l2.c b/drivers/media/usb/uvc/uvc_v4l2.c
index 3e7e283a44a8..943c6bb5548b 100644
--- a/drivers/media/usb/uvc/uvc_v4l2.c
+++ b/drivers/media/usb/uvc/uvc_v4l2.c
@@ -1240,7 +1240,7 @@ static int uvc_ioctl_subscribe_event(struct v4l2_fh *fh,
case V4L2_EVENT_CTRL:
return v4l2_event_subscribe(fh, sub, 0, &uvc_ctrl_sub_ev_ops);
default:
- return -EINVAL;
+ return v4l2_subscribe_event_v4l2(fh, sub);
}
}
--
2.13.6
next prev parent reply other threads:[~2017-10-20 21:50 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-20 21:49 [RFC v4 00/17] V4L2 Explicit Synchronization support Gustavo Padovan
2017-10-20 21:49 ` [RFC v4 01/17] [media] v4l: create v4l2_event_subscribe_v4l2() Gustavo Padovan
2017-10-24 12:51 ` Hans Verkuil
2017-10-20 21:49 ` [RFC v4 02/17] [media] v4l: use v4l2_subscribe_event_v4l2() on vtables Gustavo Padovan
2017-10-20 21:49 ` Gustavo Padovan [this message]
2017-10-20 21:49 ` [RFC v4 04/17] WIP: [media] v4l2: add v4l2_event_queue_fh_with_cb() Gustavo Padovan
2017-11-03 7:31 ` Hans Verkuil
2017-10-20 21:50 ` [RFC v4 05/17] [media] v4l: add V4L2_EVENT_OUT_FENCE event Gustavo Padovan
2017-10-24 13:09 ` Hans Verkuil
2017-10-20 21:50 ` [RFC v4 06/17] [media] vb2: add .send_out_fence() to notify userspace of out_fence_fd Gustavo Padovan
2017-10-20 21:50 ` [RFC v4 07/17] [media] vivid: assign the specific device to the vb2_queue->dev Gustavo Padovan
2017-10-20 21:50 ` [RFC v4 08/17] [media] vb2: add 'ordered_in_driver' property to queues Gustavo Padovan
2017-10-24 13:11 ` Hans Verkuil
2017-10-20 21:50 ` [RFC v4 09/17] [media] vb2: add 'ordered_in_vb2' " Gustavo Padovan
2017-11-03 7:23 ` Hans Verkuil
2017-10-20 21:50 ` [RFC v4 10/17] [media] vivid: mark vivid queues as ordered_in_driver Gustavo Padovan
2017-10-20 21:50 ` [RFC v4 11/17] [media] vb2: check earlier if stream can be started Gustavo Padovan
2017-10-20 21:50 ` [RFC v4 12/17] [media] vb2: add explicit fence user API Gustavo Padovan
2017-11-03 7:47 ` Hans Verkuil
2017-10-20 21:50 ` [RFC v4 13/17] [media] vb2: add in-fence support to QBUF Gustavo Padovan
2017-10-25 14:49 ` Brian Starkey
2017-11-10 12:38 ` Gustavo Padovan
2017-10-20 21:50 ` [RFC v4 14/17] [media] vb2: add videobuf2 dma-buf fence helpers Gustavo Padovan
2017-10-20 21:50 ` [RFC v4 15/17] [media] vb2: add infrastructure to support out-fences Gustavo Padovan
2017-10-27 9:41 ` Brian Starkey
2017-10-20 21:50 ` [RFC v4 16/17] [media] vb2: add out-fence support to QBUF Gustavo Padovan
2017-10-27 10:01 ` Brian Starkey
2017-11-03 0:03 ` Gustavo Padovan
2017-10-20 21:50 ` [RFC v4 17/17] [media] v4l: Document explicit synchronization behaviour Gustavo Padovan
2017-10-27 10:08 ` Brian Starkey
2017-11-03 7:53 ` Hans Verkuil
2017-11-03 13:32 ` Gustavo Padovan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171020215012.20646-4-gustavo@padovan.org \
--to=gustavo@padovan.org \
--cc=acourbot@chromium.org \
--cc=brian.starkey@arm.com \
--cc=gustavo.padovan@collabora.com \
--cc=hverkuil@xs4all.nl \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@osg.samsung.com \
--cc=pawel@osciak.com \
--cc=sakari.ailus@iki.fi \
--cc=shuahkh@osg.samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®