diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-04-02 10:26:22 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-04-06 20:44:27 -0400 |
commit | 5325b4272a53b43f55b82cc369c310c2fcacdca1 (patch) | |
tree | f2a1491de3d05901152e0e271c0cb5ce381884c2 /drivers/media/video/tea6420.c | |
parent | c0ff29150d37615ac703802ab3edc775fd402491 (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/tea6420.c')
-rw-r--r-- | drivers/media/video/tea6420.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/media/video/tea6420.c b/drivers/media/video/tea6420.c index 8a55b46ea9b7..ced6eadf347a 100644 --- a/drivers/media/video/tea6420.c +++ b/drivers/media/video/tea6420.c | |||
@@ -48,15 +48,15 @@ MODULE_PARM_DESC(debug, "Debug level (0-1)"); | |||
48 | 48 | ||
49 | /* make a connection between the input 'i' and the output 'o' | 49 | /* make a connection between the input 'i' and the output 'o' |
50 | with gain 'g' (note: i = 6 means 'mute') */ | 50 | with gain 'g' (note: i = 6 means 'mute') */ |
51 | static int tea6420_s_routing(struct v4l2_subdev *sd, const struct v4l2_routing *route) | 51 | static int tea6420_s_routing(struct v4l2_subdev *sd, |
52 | u32 i, u32 o, u32 config) | ||
52 | { | 53 | { |
53 | struct i2c_client *client = v4l2_get_subdevdata(sd); | 54 | struct i2c_client *client = v4l2_get_subdevdata(sd); |
54 | int i = route->input; | 55 | int g = (o >> 4) & 0xf; |
55 | int o = route->output & 0xf; | ||
56 | int g = (route->output >> 4) & 0xf; | ||
57 | u8 byte; | 56 | u8 byte; |
58 | int ret; | 57 | int ret; |
59 | 58 | ||
59 | o &= 0xf; | ||
60 | v4l2_dbg(1, debug, sd, "i=%d, o=%d, g=%d\n", i, o, g); | 60 | v4l2_dbg(1, debug, sd, "i=%d, o=%d, g=%d\n", i, o, g); |
61 | 61 | ||
62 | /* check if the parameters are valid */ | 62 | /* check if the parameters are valid */ |
@@ -133,13 +133,8 @@ static int tea6420_probe(struct i2c_client *client, | |||
133 | 133 | ||
134 | /* set initial values: set "mute"-input to all outputs at gain 0 */ | 134 | /* set initial values: set "mute"-input to all outputs at gain 0 */ |
135 | err = 0; | 135 | err = 0; |
136 | for (i = 1; i < 5; i++) { | 136 | for (i = 1; i < 5; i++) |
137 | struct v4l2_routing route; | 137 | err += tea6420_s_routing(sd, 6, i, 0); |
138 | |||
139 | route.input = 6; | ||
140 | route.output = i; | ||
141 | err += tea6420_s_routing(sd, &route); | ||
142 | } | ||
143 | if (err) { | 138 | if (err) { |
144 | v4l_dbg(1, debug, client, "could not initialize tea6420\n"); | 139 | v4l_dbg(1, debug, client, "could not initialize tea6420\n"); |
145 | return -ENODEV; | 140 | return -ENODEV; |