Skip to content

Commit

Permalink
media: cx25840: implement g_std operation
Browse files Browse the repository at this point in the history
This commit implements g_std operation in cx25840 driver by returning the
last set video standard.

Signed-off-by: Maciej S. Szmigiero <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
maciejsszmigiero authored and mchehab committed May 28, 2019
1 parent 60acc4a commit 763549a
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/media/i2c/cx25840/cx25840-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 763549a

Please sign in to comment.