aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa717x.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-04-02 10:26:22 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-04-06 20:44:27 -0400
commit5325b4272a53b43f55b82cc369c310c2fcacdca1 (patch)
treef2a1491de3d05901152e0e271c0cb5ce381884c2 /drivers/media/video/saa717x.c
parentc0ff29150d37615ac703802ab3edc775fd402491 (diff)
V4L/DVB (11380): v4l2-subdev: change s_routing prototype
It is no longer needed to use a struct pointer as argument, since v4l2_subdev doesn't require that ioctl-like approach anymore. Instead just pass the input, output and config (new!) arguments directly. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa717x.c')
-rw-r--r--drivers/media/video/saa717x.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/media/video/saa717x.c b/drivers/media/video/saa717x.c
index b73801caaa9d..b15c40908e84 100644
--- a/drivers/media/video/saa717x.c
+++ b/drivers/media/video/saa717x.c
@@ -1104,22 +1104,22 @@ static struct v4l2_queryctrl saa717x_qctrl[] = {
1104 }, 1104 },
1105}; 1105};
1106 1106
1107static int saa717x_s_video_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) 1107static int saa717x_s_video_routing(struct v4l2_subdev *sd,
1108 u32 input, u32 output, u32 config)
1108{ 1109{
1109 struct saa717x_state *decoder = to_state(sd); 1110 struct saa717x_state *decoder = to_state(sd);
1110 int inp = route->input; 1111 int is_tuner = input & 0x80; /* tuner input flag */
1111 int is_tuner = inp & 0x80; /* tuner input flag */
1112 1112
1113 inp &= 0x7f; 1113 input &= 0x7f;
1114 1114
1115 v4l2_dbg(1, debug, sd, "decoder set input (%d)\n", inp); 1115 v4l2_dbg(1, debug, sd, "decoder set input (%d)\n", input);
1116 /* inputs from 0-9 are available*/ 1116 /* inputs from 0-9 are available*/
1117 /* saa717x have mode0-mode9 but mode5 is reserved. */ 1117 /* saa717x have mode0-mode9 but mode5 is reserved. */
1118 if (inp < 0 || inp > 9 || inp == 5) 1118 if (input < 0 || input > 9 || input == 5)
1119 return -EINVAL; 1119 return -EINVAL;
1120 1120
1121 if (decoder->input != inp) { 1121 if (decoder->input != input) {
1122 int input_line = inp; 1122 int input_line = input;
1123 1123
1124 decoder->input = input_line; 1124 decoder->input = input_line;
1125 v4l2_dbg(1, debug, sd, "now setting %s input %d\n", 1125 v4l2_dbg(1, debug, sd, "now setting %s input %d\n",
@@ -1276,12 +1276,13 @@ static int saa717x_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
1276 return 0; 1276 return 0;
1277} 1277}
1278 1278
1279static int saa717x_s_audio_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) 1279static int saa717x_s_audio_routing(struct v4l2_subdev *sd,
1280 u32 input, u32 output, u32 config)
1280{ 1281{
1281 struct saa717x_state *decoder = to_state(sd); 1282 struct saa717x_state *decoder = to_state(sd);
1282 1283
1283 if (route->input < 3) { /* FIXME! --tadachi */ 1284 if (input < 3) { /* FIXME! --tadachi */
1284 decoder->audio_input = route->input; 1285 decoder->audio_input = input;
1285 v4l2_dbg(1, debug, sd, 1286 v4l2_dbg(1, debug, sd,
1286 "set decoder audio input to %d\n", 1287 "set decoder audio input to %d\n",
1287 decoder->audio_input); 1288 decoder->audio_input);