diff options
author | Michael Krufky <mkrufky@linuxtv.org> | 2008-09-12 12:31:45 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:37:09 -0400 |
commit | d7cba043d7ec840d67bd5143779d1febe7d83407 (patch) | |
tree | 4fb46684538e0ad7d3229f592182ed6121049d69 /drivers/media/video/tuner-core.c | |
parent | ebb8d68a5c8c236acd8e8cf8f0d6046e027a8e21 (diff) |
V4L/DVB (9049): convert tuner drivers to use dvb_frontend->callback
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r-- | drivers/media/video/tuner-core.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 39c7b9b835a3..4a7735c6c1a6 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -92,7 +92,6 @@ struct tuner { | |||
92 | 92 | ||
93 | unsigned int type; /* chip type id */ | 93 | unsigned int type; /* chip type id */ |
94 | unsigned int config; | 94 | unsigned int config; |
95 | int (*tuner_callback) (void *dev, int command, int arg); | ||
96 | const char *name; | 95 | const char *name; |
97 | }; | 96 | }; |
98 | 97 | ||
@@ -346,7 +345,7 @@ static struct xc5000_config xc5000_cfg; | |||
346 | 345 | ||
347 | static void set_type(struct i2c_client *c, unsigned int type, | 346 | static void set_type(struct i2c_client *c, unsigned int type, |
348 | unsigned int new_mode_mask, unsigned int new_config, | 347 | unsigned int new_mode_mask, unsigned int new_config, |
349 | int (*tuner_callback) (void *dev, int command,int arg)) | 348 | int (*tuner_callback) (void *dev, int component, int cmd, int arg)) |
350 | { | 349 | { |
351 | struct tuner *t = i2c_get_clientdata(c); | 350 | struct tuner *t = i2c_get_clientdata(c); |
352 | struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; | 351 | struct dvb_tuner_ops *fe_tuner_ops = &t->fe.ops.tuner_ops; |
@@ -362,7 +361,7 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
362 | t->config = new_config; | 361 | t->config = new_config; |
363 | if (tuner_callback != NULL) { | 362 | if (tuner_callback != NULL) { |
364 | tuner_dbg("defining GPIO callback\n"); | 363 | tuner_dbg("defining GPIO callback\n"); |
365 | t->tuner_callback = tuner_callback; | 364 | t->fe.callback = tuner_callback; |
366 | } | 365 | } |
367 | 366 | ||
368 | if (t->mode == T_UNINITIALIZED) { | 367 | if (t->mode == T_UNINITIALIZED) { |
@@ -385,7 +384,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
385 | { | 384 | { |
386 | struct tda829x_config cfg = { | 385 | struct tda829x_config cfg = { |
387 | .lna_cfg = t->config, | 386 | .lna_cfg = t->config, |
388 | .tuner_callback = t->tuner_callback, | ||
389 | }; | 387 | }; |
390 | if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter, | 388 | if (!dvb_attach(tda829x_attach, &t->fe, t->i2c->adapter, |
391 | t->i2c->addr, &cfg)) | 389 | t->i2c->addr, &cfg)) |
@@ -433,7 +431,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
433 | struct xc2028_config cfg = { | 431 | struct xc2028_config cfg = { |
434 | .i2c_adap = t->i2c->adapter, | 432 | .i2c_adap = t->i2c->adapter, |
435 | .i2c_addr = t->i2c->addr, | 433 | .i2c_addr = t->i2c->addr, |
436 | .callback = t->tuner_callback, | ||
437 | }; | 434 | }; |
438 | if (!dvb_attach(xc2028_attach, &t->fe, &cfg)) | 435 | if (!dvb_attach(xc2028_attach, &t->fe, &cfg)) |
439 | goto attach_failed; | 436 | goto attach_failed; |
@@ -450,7 +447,6 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
450 | 447 | ||
451 | xc5000_cfg.i2c_address = t->i2c->addr; | 448 | xc5000_cfg.i2c_address = t->i2c->addr; |
452 | xc5000_cfg.if_khz = 5380; | 449 | xc5000_cfg.if_khz = 5380; |
453 | xc5000_cfg.tuner_callback = t->tuner_callback; | ||
454 | if (!dvb_attach(xc5000_attach, | 450 | if (!dvb_attach(xc5000_attach, |
455 | &t->fe, t->i2c->adapter, &xc5000_cfg)) | 451 | &t->fe, t->i2c->adapter, &xc5000_cfg)) |
456 | goto attach_failed; | 452 | goto attach_failed; |
@@ -1224,7 +1220,7 @@ register_client: | |||
1224 | } else { | 1220 | } else { |
1225 | t->mode = V4L2_TUNER_DIGITAL_TV; | 1221 | t->mode = V4L2_TUNER_DIGITAL_TV; |
1226 | } | 1222 | } |
1227 | set_type(client, t->type, t->mode_mask, t->config, t->tuner_callback); | 1223 | set_type(client, t->type, t->mode_mask, t->config, t->fe.callback); |
1228 | list_add_tail(&t->list, &tuner_list); | 1224 | list_add_tail(&t->list, &tuner_list); |
1229 | return 0; | 1225 | return 0; |
1230 | } | 1226 | } |