aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-09-12 12:31:45 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-10-12 07:37:09 -0400
commitd7cba043d7ec840d67bd5143779d1febe7d83407 (patch)
tree4fb46684538e0ad7d3229f592182ed6121049d69 /drivers/media/video/cx23885
parentebb8d68a5c8c236acd8e8cf8f0d6046e027a8e21 (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/cx23885')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c2
-rw-r--r--drivers/media/video/cx23885/cx23885-dvb.c12
-rw-r--r--drivers/media/video/cx23885/cx23885.h2
3 files changed, 4 insertions, 12 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index ccea8de7c7dc..2cda15f829fd 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -337,7 +337,7 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
337 dev->name, tv.model); 337 dev->name, tv.model);
338} 338}
339 339
340int cx23885_tuner_callback(void *priv, int command, int arg) 340int cx23885_tuner_callback(void *priv, int component, int command, int arg)
341{ 341{
342 struct cx23885_tsport *port = priv; 342 struct cx23885_tsport *port = priv;
343 struct cx23885_dev *dev = port->dev; 343 struct cx23885_dev *dev = port->dev;
diff --git a/drivers/media/video/cx23885/cx23885-dvb.c b/drivers/media/video/cx23885/cx23885-dvb.c
index 3b54f1391803..6c5475d7d321 100644
--- a/drivers/media/video/cx23885/cx23885-dvb.c
+++ b/drivers/media/video/cx23885/cx23885-dvb.c
@@ -189,13 +189,11 @@ static struct s5h1411_config dvico_s5h1411_config = {
189static struct xc5000_config hauppauge_hvr1500q_tunerconfig = { 189static struct xc5000_config hauppauge_hvr1500q_tunerconfig = {
190 .i2c_address = 0x61, 190 .i2c_address = 0x61,
191 .if_khz = 5380, 191 .if_khz = 5380,
192 .tuner_callback = cx23885_tuner_callback,
193}; 192};
194 193
195static struct xc5000_config dvico_xc5000_tunerconfig = { 194static struct xc5000_config dvico_xc5000_tunerconfig = {
196 .i2c_address = 0x64, 195 .i2c_address = 0x64,
197 .if_khz = 5380, 196 .if_khz = 5380,
198 .tuner_callback = cx23885_tuner_callback,
199}; 197};
200 198
201static struct tda829x_config tda829x_no_probe = { 199static struct tda829x_config tda829x_no_probe = {
@@ -403,8 +401,6 @@ static int dvb_register(struct cx23885_tsport *port)
403 struct xc2028_config cfg = { 401 struct xc2028_config cfg = {
404 .i2c_adap = &i2c_bus->i2c_adap, 402 .i2c_adap = &i2c_bus->i2c_adap,
405 .i2c_addr = 0x61, 403 .i2c_addr = 0x61,
406 .video_dev = port,
407 .callback = cx23885_tuner_callback,
408 }; 404 };
409 static struct xc2028_ctrl ctl = { 405 static struct xc2028_ctrl ctl = {
410 .fname = XC2028_DEFAULT_FIRMWARE, 406 .fname = XC2028_DEFAULT_FIRMWARE,
@@ -443,8 +439,6 @@ static int dvb_register(struct cx23885_tsport *port)
443 struct xc2028_config cfg = { 439 struct xc2028_config cfg = {
444 .i2c_adap = &dev->i2c_bus[1].i2c_adap, 440 .i2c_adap = &dev->i2c_bus[1].i2c_adap,
445 .i2c_addr = 0x64, 441 .i2c_addr = 0x64,
446 .video_dev = port,
447 .callback = cx23885_tuner_callback,
448 }; 442 };
449 static struct xc2028_ctrl ctl = { 443 static struct xc2028_ctrl ctl = {
450 .fname = XC3028L_DEFAULT_FIRMWARE, 444 .fname = XC3028L_DEFAULT_FIRMWARE,
@@ -485,8 +479,6 @@ static int dvb_register(struct cx23885_tsport *port)
485 struct xc2028_config cfg = { 479 struct xc2028_config cfg = {
486 .i2c_adap = &i2c_bus->i2c_adap, 480 .i2c_adap = &i2c_bus->i2c_adap,
487 .i2c_addr = 0x61, 481 .i2c_addr = 0x61,
488 .video_dev = port,
489 .callback = cx23885_tuner_callback,
490 }; 482 };
491 static struct xc2028_ctrl ctl = { 483 static struct xc2028_ctrl ctl = {
492 .fname = XC2028_DEFAULT_FIRMWARE, 484 .fname = XC2028_DEFAULT_FIRMWARE,
@@ -512,8 +504,6 @@ static int dvb_register(struct cx23885_tsport *port)
512 struct xc2028_config cfg = { 504 struct xc2028_config cfg = {
513 .i2c_adap = &dev->i2c_bus[1].i2c_adap, 505 .i2c_adap = &dev->i2c_bus[1].i2c_adap,
514 .i2c_addr = 0x61, 506 .i2c_addr = 0x61,
515 .video_dev = port,
516 .callback = cx23885_tuner_callback,
517 }; 507 };
518 static struct xc2028_ctrl ctl = { 508 static struct xc2028_ctrl ctl = {
519 .fname = XC2028_DEFAULT_FIRMWARE, 509 .fname = XC2028_DEFAULT_FIRMWARE,
@@ -536,6 +526,8 @@ static int dvb_register(struct cx23885_tsport *port)
536 printk("%s: frontend initialization failed\n", dev->name); 526 printk("%s: frontend initialization failed\n", dev->name);
537 return -1; 527 return -1;
538 } 528 }
529 /* define general-purpose callback pointer */
530 port->dvb.frontend->callback = cx23885_tuner_callback;
539 531
540 /* Put the analog decoder in standby to keep it quiet */ 532 /* Put the analog decoder in standby to keep it quiet */
541 cx23885_call_i2c_clients(i2c_bus, TUNER_SET_STANDBY, NULL); 533 cx23885_call_i2c_clients(i2c_bus, TUNER_SET_STANDBY, NULL);
diff --git a/drivers/media/video/cx23885/cx23885.h b/drivers/media/video/cx23885/cx23885.h
index 4e0fcb3f7fcb..ba4e0aaed463 100644
--- a/drivers/media/video/cx23885/cx23885.h
+++ b/drivers/media/video/cx23885/cx23885.h
@@ -411,7 +411,7 @@ extern const unsigned int cx23885_bcount;
411extern struct cx23885_subid cx23885_subids[]; 411extern struct cx23885_subid cx23885_subids[];
412extern const unsigned int cx23885_idcount; 412extern const unsigned int cx23885_idcount;
413 413
414extern int cx23885_tuner_callback(void *priv, int command, int arg); 414extern int cx23885_tuner_callback(void *priv, int component, int command, int arg);
415extern void cx23885_card_list(struct cx23885_dev *dev); 415extern void cx23885_card_list(struct cx23885_dev *dev);
416extern int cx23885_ir_init(struct cx23885_dev *dev); 416extern int cx23885_ir_init(struct cx23885_dev *dev);
417extern void cx23885_gpio_setup(struct cx23885_dev *dev); 417extern void cx23885_gpio_setup(struct cx23885_dev *dev);