aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb
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/dvb/dvb-usb
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/dvb/dvb-usb')
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c7
-rw-r--r--drivers/media/dvb/dvb-usb/dib0700_devices.c8
2 files changed, 10 insertions, 5 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 1a746127cbda..406d7fba369d 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -742,7 +742,8 @@ static int cxusb_lgh064f_tuner_attach(struct dvb_usb_adapter *adap)
742 return 0; 742 return 0;
743} 743}
744 744
745static int dvico_bluebird_xc2028_callback(void *ptr, int command, int arg) 745static int dvico_bluebird_xc2028_callback(void *ptr, int component,
746 int command, int arg)
746{ 747{
747 struct dvb_usb_adapter *adap = ptr; 748 struct dvb_usb_adapter *adap = ptr;
748 struct dvb_usb_device *d = adap->dev; 749 struct dvb_usb_device *d = adap->dev;
@@ -770,7 +771,6 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
770 struct xc2028_config cfg = { 771 struct xc2028_config cfg = {
771 .i2c_adap = &adap->dev->i2c_adap, 772 .i2c_adap = &adap->dev->i2c_adap,
772 .i2c_addr = 0x61, 773 .i2c_addr = 0x61,
773 .callback = dvico_bluebird_xc2028_callback,
774 }; 774 };
775 static struct xc2028_ctrl ctl = { 775 static struct xc2028_ctrl ctl = {
776 .fname = XC2028_DEFAULT_FIRMWARE, 776 .fname = XC2028_DEFAULT_FIRMWARE,
@@ -778,6 +778,9 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
778 .demod = XC3028_FE_ZARLINK456, 778 .demod = XC3028_FE_ZARLINK456,
779 }; 779 };
780 780
781 /* FIXME: generalize & move to common area */
782 adap->fe->callback = dvico_bluebird_xc2028_callback;
783
781 fe = dvb_attach(xc2028_attach, adap->fe, &cfg); 784 fe = dvb_attach(xc2028_attach, adap->fe, &cfg);
782 if (fe == NULL || fe->ops.tuner_ops.set_config == NULL) 785 if (fe == NULL || fe->ops.tuner_ops.set_config == NULL)
783 return -EIO; 786 return -EIO;
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c
index 565563e68103..8b74e13a6460 100644
--- a/drivers/media/dvb/dvb-usb/dib0700_devices.c
+++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c
@@ -368,7 +368,8 @@ static struct dib7000p_config stk7700ph_dib7700_xc3028_config = {
368 .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS, 368 .gpio_pwm_pos = DIB7000P_GPIO_DEFAULT_PWM_POS,
369}; 369};
370 370
371static int stk7700ph_xc3028_callback(void *ptr, int command, int arg) 371static int stk7700ph_xc3028_callback(void *ptr, int component,
372 int command, int arg)
372{ 373{
373 struct dvb_usb_adapter *adap = ptr; 374 struct dvb_usb_adapter *adap = ptr;
374 375
@@ -396,7 +397,6 @@ static struct xc2028_ctrl stk7700ph_xc3028_ctrl = {
396 397
397static struct xc2028_config stk7700ph_xc3028_config = { 398static struct xc2028_config stk7700ph_xc3028_config = {
398 .i2c_addr = 0x61, 399 .i2c_addr = 0x61,
399 .callback = stk7700ph_xc3028_callback,
400 .ctrl = &stk7700ph_xc3028_ctrl, 400 .ctrl = &stk7700ph_xc3028_ctrl,
401}; 401};
402 402
@@ -437,7 +437,9 @@ static int stk7700ph_tuner_attach(struct dvb_usb_adapter *adap)
437 DIBX000_I2C_INTERFACE_TUNER, 1); 437 DIBX000_I2C_INTERFACE_TUNER, 1);
438 438
439 stk7700ph_xc3028_config.i2c_adap = tun_i2c; 439 stk7700ph_xc3028_config.i2c_adap = tun_i2c;
440 stk7700ph_xc3028_config.video_dev = adap; 440
441 /* FIXME: generalize & move to common area */
442 adap->fe->callback = stk7700ph_xc3028_callback;
441 443
442 return dvb_attach(xc2028_attach, adap->fe, &stk7700ph_xc3028_config) 444 return dvb_attach(xc2028_attach, adap->fe, &stk7700ph_xc3028_config)
443 == NULL ? -ENODEV : 0; 445 == NULL ? -ENODEV : 0;