aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2019-04-29 12:16:54 -0400
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-05-28 15:42:30 -0400
commit763549a3cf121d59d5e9ad078ae71d94be9be748 (patch)
tree653fedc0bec730a542ed162f9191679de517d54b /drivers/media/i2c
parentmedia: cx25840: g_std operation really implements querystd operation (diff)
downloadlinux-dev-763549a3cf121d59d5e9ad078ae71d94be9be748.tar.xz
linux-dev-763549a3cf121d59d5e9ad078ae71d94be9be748.zip
media: cx25840: implement g_std operation
This commit implements g_std operation in cx25840 driver by returning the last set video standard. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/cx25840/cx25840-core.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/media/i2c/cx25840/cx25840-core.c b/drivers/media/i2c/cx25840/cx25840-core.c
index 2bcaf239b0d2..8c1111ba051b 100644
--- a/drivers/media/i2c/cx25840/cx25840-core.c
+++ b/drivers/media/i2c/cx25840/cx25840-core.c
@@ -1822,6 +1822,15 @@ static int cx25840_g_input_status(struct v4l2_subdev *sd, u32 *status)
return 0;
}
+static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
+{
+ struct cx25840_state *state = to_state(sd);
+
+ *std = state->std;
+
+ return 0;
+}
+
static int cx25840_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
{
struct cx25840_state *state = to_state(sd);
@@ -5081,6 +5090,7 @@ static const struct v4l2_subdev_audio_ops cx25840_audio_ops = {
};
static const struct v4l2_subdev_video_ops cx25840_video_ops = {
+ .g_std = cx25840_g_std,
.s_std = cx25840_s_std,
.querystd = cx25840_querystd,
.s_routing = cx25840_s_video_routing,