diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-05-14 03:49:00 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2006-06-25 01:00:41 -0400 |
commit | 332bed5fc25ab0eb84215ecd89a4acd48219eee0 (patch) | |
tree | 84145b98ee43babae232457b45de2a90de7f7f22 /drivers/media/dvb/dvb-usb/cxusb.c | |
parent | 2938d7800f2ea2f8ad88d5b241cbda868875e965 (diff) |
V4L/DVB (4027): Fixes after dvb_tuner_ops-conversion
Some of the dvb_tuner_ops-pointer were set before having a dvb_frontend creating.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/cxusb.c | 31 |
1 files changed, 18 insertions, 13 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index 0f178377d1a6..500785e41e28 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -359,6 +359,10 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d) | |||
359 | d->pll_addr = 0x61; | 359 | d->pll_addr = 0x61; |
360 | memcpy(d->pll_init, bpll, 4); | 360 | memcpy(d->pll_init, bpll, 4); |
361 | d->pll_desc = &dvb_pll_fmd1216me; | 361 | d->pll_desc = &dvb_pll_fmd1216me; |
362 | |||
363 | d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; | ||
364 | d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; | ||
365 | |||
362 | return 0; | 366 | return 0; |
363 | } | 367 | } |
364 | 368 | ||
@@ -366,6 +370,7 @@ static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d) | |||
366 | { | 370 | { |
367 | d->pll_addr = 0x61; | 371 | d->pll_addr = 0x61; |
368 | d->pll_desc = &dvb_pll_thomson_dtt7579; | 372 | d->pll_desc = &dvb_pll_thomson_dtt7579; |
373 | d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | ||
369 | return 0; | 374 | return 0; |
370 | } | 375 | } |
371 | 376 | ||
@@ -373,6 +378,7 @@ static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d) | |||
373 | { | 378 | { |
374 | d->pll_addr = 0x61; | 379 | d->pll_addr = 0x61; |
375 | d->pll_desc = &dvb_pll_lg_z201; | 380 | d->pll_desc = &dvb_pll_lg_z201; |
381 | d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | ||
376 | return 0; | 382 | return 0; |
377 | } | 383 | } |
378 | 384 | ||
@@ -380,6 +386,13 @@ static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d) | |||
380 | { | 386 | { |
381 | d->pll_addr = 0x60; | 387 | d->pll_addr = 0x60; |
382 | d->pll_desc = &dvb_pll_thomson_dtt7579; | 388 | d->pll_desc = &dvb_pll_thomson_dtt7579; |
389 | d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | ||
390 | return 0; | ||
391 | } | ||
392 | |||
393 | static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d) | ||
394 | { | ||
395 | d->fe->ops->tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; | ||
383 | return 0; | 396 | return 0; |
384 | } | 397 | } |
385 | 398 | ||
@@ -391,11 +404,8 @@ static int cxusb_cx22702_frontend_attach(struct dvb_usb_device *d) | |||
391 | 404 | ||
392 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, &b, 1); | 405 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, &b, 1); |
393 | 406 | ||
394 | if ((d->fe = cx22702_attach(&cxusb_cx22702_config, &d->i2c_adap)) != NULL) { | 407 | if ((d->fe = cx22702_attach(&cxusb_cx22702_config, &d->i2c_adap)) != NULL) |
395 | d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; | ||
396 | d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c; | ||
397 | return 0; | 408 | return 0; |
398 | } | ||
399 | 409 | ||
400 | return -EIO; | 410 | return -EIO; |
401 | } | 411 | } |
@@ -407,10 +417,8 @@ static int cxusb_lgdt3303_frontend_attach(struct dvb_usb_device *d) | |||
407 | 417 | ||
408 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | 418 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); |
409 | 419 | ||
410 | if ((d->fe = lgdt330x_attach(&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL) { | 420 | if ((d->fe = lgdt330x_attach(&cxusb_lgdt3303_config, &d->i2c_adap)) != NULL) |
411 | d->fe->ops->tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; | ||
412 | return 0; | 421 | return 0; |
413 | } | ||
414 | 422 | ||
415 | return -EIO; | 423 | return -EIO; |
416 | } | 424 | } |
@@ -422,10 +430,8 @@ static int cxusb_mt352_frontend_attach(struct dvb_usb_device *d) | |||
422 | 430 | ||
423 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | 431 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); |
424 | 432 | ||
425 | if ((d->fe = mt352_attach(&cxusb_mt352_config, &d->i2c_adap)) != NULL) { | 433 | if ((d->fe = mt352_attach(&cxusb_mt352_config, &d->i2c_adap)) != NULL) |
426 | d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | ||
427 | return 0; | 434 | return 0; |
428 | } | ||
429 | 435 | ||
430 | return -EIO; | 436 | return -EIO; |
431 | } | 437 | } |
@@ -437,10 +443,8 @@ static int cxusb_dee1601_frontend_attach(struct dvb_usb_device *d) | |||
437 | 443 | ||
438 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); | 444 | cxusb_ctrl_msg(d,CMD_DIGITAL, NULL, 0, NULL, 0); |
439 | 445 | ||
440 | if ((d->fe = mt352_attach(&cxusb_dee1601_config, &d->i2c_adap)) != NULL) { | 446 | if ((d->fe = mt352_attach(&cxusb_dee1601_config, &d->i2c_adap)) != NULL) |
441 | d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; | ||
442 | return 0; | 447 | return 0; |
443 | } | ||
444 | 448 | ||
445 | return -EIO; | 449 | return -EIO; |
446 | } | 450 | } |
@@ -555,6 +559,7 @@ static struct dvb_usb_properties cxusb_bluebird_lgh064f_properties = { | |||
555 | .streaming_ctrl = cxusb_streaming_ctrl, | 559 | .streaming_ctrl = cxusb_streaming_ctrl, |
556 | .power_ctrl = cxusb_bluebird_power_ctrl, | 560 | .power_ctrl = cxusb_bluebird_power_ctrl, |
557 | .frontend_attach = cxusb_lgdt3303_frontend_attach, | 561 | .frontend_attach = cxusb_lgdt3303_frontend_attach, |
562 | .tuner_attach = cxusb_lgdt3303_tuner_attach, | ||
558 | 563 | ||
559 | .i2c_algo = &cxusb_i2c_algo, | 564 | .i2c_algo = &cxusb_i2c_algo, |
560 | 565 | ||