Commit 60acc4ab authored by Maciej S. Szmigiero's avatar Maciej S. Szmigiero Committed by Mauro Carvalho Chehab

media: cx25840: g_std operation really implements querystd operation

cx25840 driver g_std operation queries the currently detected video signal,
however this is what querystd operation should do, so let's rename the
handler.

None of the existing cx25840 driver users ever called the g_std operation,
one of them calls querystd on each of its subdevs but then the result is
only used to implement VIDIOC_QUERYSTD (as it should).
Signed-off-by: default avatarMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent ccf7a31f
...@@ -1772,7 +1772,7 @@ static int cx25840_s_stream(struct v4l2_subdev *sd, int enable) ...@@ -1772,7 +1772,7 @@ static int cx25840_s_stream(struct v4l2_subdev *sd, int enable)
} }
/* Query the current detected video format */ /* Query the current detected video format */
static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std) static int cx25840_querystd(struct v4l2_subdev *sd, v4l2_std_id *std)
{ {
struct i2c_client *client = v4l2_get_subdevdata(sd); struct i2c_client *client = v4l2_get_subdevdata(sd);
...@@ -1800,8 +1800,9 @@ static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std) ...@@ -1800,8 +1800,9 @@ static int cx25840_g_std(struct v4l2_subdev *sd, v4l2_std_id *std)
u32 fmt = (cx25840_read4(client, 0x40c) >> 8) & 0xf; u32 fmt = (cx25840_read4(client, 0x40c) >> 8) & 0xf;
*std = stds[ fmt ]; *std = stds[ fmt ];
v4l_dbg(1, cx25840_debug, client, "g_std fmt = %x, v4l2_std_id = 0x%x\n", v4l_dbg(1, cx25840_debug, client,
fmt, (unsigned int)stds[ fmt ]); "querystd fmt = %x, v4l2_std_id = 0x%x\n",
fmt, (unsigned int)stds[fmt]);
return 0; return 0;
} }
...@@ -5081,7 +5082,7 @@ static const struct v4l2_subdev_audio_ops cx25840_audio_ops = { ...@@ -5081,7 +5082,7 @@ static const struct v4l2_subdev_audio_ops cx25840_audio_ops = {
static const struct v4l2_subdev_video_ops cx25840_video_ops = { static const struct v4l2_subdev_video_ops cx25840_video_ops = {
.s_std = cx25840_s_std, .s_std = cx25840_s_std,
.g_std = cx25840_g_std, .querystd = cx25840_querystd,
.s_routing = cx25840_s_video_routing, .s_routing = cx25840_s_video_routing,
.s_stream = cx25840_s_stream, .s_stream = cx25840_s_stream,
.g_input_status = cx25840_g_input_status, .g_input_status = cx25840_g_input_status,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment