aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tda8290.c
diff options
context:
space:
mode:
authorHartmut Hackmann <hartmut.hackmann@t-online.de>2007-04-27 11:31:17 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-04-27 14:43:40 -0400
commitcfeb88398f004a0e85ee011fd89a01f5d3bf3c81 (patch)
treea2df3639bc592b16cdf9a48f8fc39a465f9f9a07 /drivers/media/video/tda8290.c
parentb8bc76d88fa7a1e4cd679fac3adfc5afeb2b3427 (diff)
V4L/DVB (5323): Updated support for tuner callbacks
This change supplies a more generic version of the tuner callback. The tuner struct now has a function pointer int (*tuner_callback) (void *dev, int command, int arg) additionally to a int config parameter. both can be set through the TUNER_SET_TYPE_ADDR client call. Note that the meaning of the parameters depend on the tuner type. Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/tda8290.c')
-rw-r--r--drivers/media/video/tda8290.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/video/tda8290.c b/drivers/media/video/tda8290.c
index e6c3e6167191..44348f95dd4c 100644
--- a/drivers/media/video/tda8290.c
+++ b/drivers/media/video/tda8290.c
@@ -211,19 +211,19 @@ static void tda827xa_lna_gain(struct i2c_client *c, int high)
211 case 2: 211 case 2:
212 /* turn Vsync on */ 212 /* turn Vsync on */
213 if (t->std & V4L2_STD_MN) 213 if (t->std & V4L2_STD_MN)
214 arg = 5; 214 arg = 1;
215 else 215 else
216 arg = 4; 216 arg = 0;
217 if (t->gpio_func) 217 if (t->tuner_callback)
218 t->gpio_func(c->adapter->algo_data, 22, 5); 218 t->tuner_callback(c->adapter->algo_data, 1, arg);
219 buf[1] = high ? 0 : 1; 219 buf[1] = high ? 0 : 1;
220 if (t->config == 2) 220 if (t->config == 2)
221 buf[1] = high ? 1 : 0; 221 buf[1] = high ? 1 : 0;
222 i2c_transfer(c->adapter, &msg, 1); 222 i2c_transfer(c->adapter, &msg, 1);
223 break; 223 break;
224 case 3: /* switch with GPIO of saa713x */ 224 case 3: /* switch with GPIO of saa713x */
225 if (t->gpio_func) 225 if (t->tuner_callback)
226 t->gpio_func(c->adapter->algo_data, 22, high); 226 t->tuner_callback(c->adapter->algo_data, 0, high);
227 break; 227 break;
228 } 228 }
229} 229}