aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-fe-tuner.c24
-rw-r--r--drivers/media/dvb/bt8xx/dst.c10
-rw-r--r--drivers/media/dvb/bt8xx/dst_common.h2
-rw-r--r--drivers/media/dvb/bt8xx/dvb-bt8xx.c38
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.c152
-rw-r--r--drivers/media/dvb/dvb-core/dvb_frontend.h2
-rw-r--r--drivers/media/dvb/dvb-usb/cxusb.c12
-rw-r--r--drivers/media/dvb/dvb-usb/dibusb-mb.c7
-rw-r--r--drivers/media/dvb/dvb-usb/digitv.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dtt200u-fe.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-dvb.c8
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-i2c.c8
-rw-r--r--drivers/media/dvb/dvb-usb/umt-010.c2
-rw-r--r--drivers/media/dvb/dvb-usb/vp702x-fe.c3
-rw-r--r--drivers/media/dvb/dvb-usb/vp7045-fe.c5
-rw-r--r--drivers/media/dvb/frontends/bcm3510.c4
-rw-r--r--drivers/media/dvb/frontends/bsbe1.h4
-rw-r--r--drivers/media/dvb/frontends/bsru6.h4
-rw-r--r--drivers/media/dvb/frontends/cx22700.c11
-rw-r--r--drivers/media/dvb/frontends/cx22702.c11
-rw-r--r--drivers/media/dvb/frontends/cx24110.c11
-rw-r--r--drivers/media/dvb/frontends/cx24123.c8
-rw-r--r--drivers/media/dvb/frontends/dib3000-common.h2
-rw-r--r--drivers/media/dvb/frontends/dib3000mb.c9
-rw-r--r--drivers/media/dvb/frontends/dib3000mc.c12
-rw-r--r--drivers/media/dvb/frontends/dvb-pll.c20
-rw-r--r--drivers/media/dvb/frontends/dvb_dummy_fe.c16
-rw-r--r--drivers/media/dvb/frontends/isl6421.c14
-rw-r--r--drivers/media/dvb/frontends/l64781.c10
-rw-r--r--drivers/media/dvb/frontends/lg_h06xf.h8
-rw-r--r--drivers/media/dvb/frontends/lgdt330x.c17
-rw-r--r--drivers/media/dvb/frontends/lnbp21.c14
-rw-r--r--drivers/media/dvb/frontends/mt312.c27
-rw-r--r--drivers/media/dvb/frontends/mt352.c16
-rw-r--r--drivers/media/dvb/frontends/nxt200x.c8
-rw-r--r--drivers/media/dvb/frontends/nxt6000.c10
-rw-r--r--drivers/media/dvb/frontends/or51132.c12
-rw-r--r--drivers/media/dvb/frontends/or51211.c4
-rw-r--r--drivers/media/dvb/frontends/s5h1420.c22
-rw-r--r--drivers/media/dvb/frontends/sp8870.c11
-rw-r--r--drivers/media/dvb/frontends/sp887x.c16
-rw-r--r--drivers/media/dvb/frontends/stv0297.c10
-rw-r--r--drivers/media/dvb/frontends/stv0299.c10
-rw-r--r--drivers/media/dvb/frontends/tda10021.c10
-rw-r--r--drivers/media/dvb/frontends/tda1004x.c13
-rw-r--r--drivers/media/dvb/frontends/tda8083.c10
-rw-r--r--drivers/media/dvb/frontends/ves1820.c16
-rw-r--r--drivers/media/dvb/frontends/ves1x93.c10
-rw-r--r--drivers/media/dvb/frontends/zl10353.c14
-rw-r--r--drivers/media/dvb/pluto2/pluto2.c10
-rw-r--r--drivers/media/dvb/ttpci/av7110.c116
-rw-r--r--drivers/media/dvb/ttpci/budget-av.c56
-rw-r--r--drivers/media/dvb/ttpci/budget-ci.c54
-rw-r--r--drivers/media/dvb/ttpci/budget-patch.c36
-rw-r--r--drivers/media/dvb/ttpci/budget.c58
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c58
-rw-r--r--drivers/media/dvb/ttusb-dec/ttusb_dec.c4
-rw-r--r--drivers/media/dvb/ttusb-dec/ttusbdecfe.c8
-rw-r--r--drivers/media/video/cx88/cx88-dvb.c36
-rw-r--r--drivers/media/video/cx88/cx88-i2c.c8
-rw-r--r--drivers/media/video/saa7134/saa7134-dvb.c166
61 files changed, 604 insertions, 681 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
index 89ea76201506..15aae7cba2d9 100644
--- a/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
+++ b/drivers/media/dvb/b2c2/flexcop-fe-tuner.c
@@ -183,8 +183,8 @@ static int samsung_tbmu24112_tuner_set_params(struct dvb_frontend* fe, struct dv
183 183
184 if (params->frequency < 1500000) buf[3] |= 0x10; 184 if (params->frequency < 1500000) buf[3] |= 0x10;
185 185
186 if (fe->ops->i2c_gate_ctrl) 186 if (fe->ops.i2c_gate_ctrl)
187 fe->ops->i2c_gate_ctrl(fe, 1); 187 fe->ops.i2c_gate_ctrl(fe, 1);
188 if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1) { 188 if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1) {
189 return -EIO; 189 return -EIO;
190 } 190 }
@@ -342,8 +342,8 @@ static int skystar23_samsung_tbdu18132_tuner_set_params(struct dvb_frontend* fe,
342 if (params->frequency < 1550000) 342 if (params->frequency < 1550000)
343 buf[3] |= 0x02; 343 buf[3] |= 0x02;
344 344
345 if (fe->ops->i2c_gate_ctrl) 345 if (fe->ops.i2c_gate_ctrl)
346 fe->ops->i2c_gate_ctrl(fe, 1); 346 fe->ops.i2c_gate_ctrl(fe, 1);
347 if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1) 347 if (i2c_transfer(&fc->i2c_adap, &msg, 1) != 1)
348 return -EIO; 348 return -EIO;
349 return 0; 349 return 0;
@@ -389,8 +389,8 @@ int alps_tdee4_stv0297_tuner_set_params (struct dvb_frontend* fe, struct dvb_fro
389 else if (fep->frequency <= 822000000) buf[3] = 0x08; 389 else if (fep->frequency <= 822000000) buf[3] = 0x08;
390 else buf[3] = 0x88; 390 else buf[3] = 0x88;
391 391
392 if (fe->ops->i2c_gate_ctrl) 392 if (fe->ops.i2c_gate_ctrl)
393 fe->ops->i2c_gate_ctrl(fe, 1); 393 fe->ops.i2c_gate_ctrl(fe, 1);
394 deb_tuner("tuner buffer for %d Hz: %x %x %x %x\n",fep->frequency, buf[0],buf[1],buf[2],buf[3]); 394 deb_tuner("tuner buffer for %d Hz: %x %x %x %x\n",fep->frequency, buf[0],buf[1],buf[2],buf[3]);
395 ret = fc->i2c_request(fc,FC_WRITE,FC_I2C_PORT_TUNER,0x61,buf[0],&buf[1],3); 395 ret = fc->i2c_request(fc,FC_WRITE,FC_I2C_PORT_TUNER,0x61,buf[0],&buf[1],3);
396 deb_tuner("tuner write returned: %d\n",ret); 396 deb_tuner("tuner write returned: %d\n",ret);
@@ -505,7 +505,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
505 505
506 /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */ 506 /* try the sky v2.6 (stv0299/Samsung tbmu24112(sl1935)) */
507 if ((fc->fe = stv0299_attach(&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) { 507 if ((fc->fe = stv0299_attach(&samsung_tbmu24112_config, &fc->i2c_adap)) != NULL) {
508 ops = fc->fe->ops; 508 ops = &fc->fe->ops;
509 509
510 ops->tuner_ops.set_params = samsung_tbmu24112_tuner_set_params; 510 ops->tuner_ops.set_params = samsung_tbmu24112_tuner_set_params;
511 511
@@ -520,7 +520,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
520 /* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */ 520 /* try the air dvb-t (mt352/Samsung tdtc9251dh0(??)) */
521 if ((fc->fe = mt352_attach(&samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) { 521 if ((fc->fe = mt352_attach(&samsung_tdtc9251dh0_config, &fc->i2c_adap)) != NULL ) {
522 fc->dev_type = FC_AIR_DVB; 522 fc->dev_type = FC_AIR_DVB;
523 fc->fe->ops->tuner_ops.calc_regs = samsung_tdtc9251dh0_calc_regs; 523 fc->fe->ops.tuner_ops.calc_regs = samsung_tdtc9251dh0_calc_regs;
524 info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address); 524 info("found the mt352 at i2c address: 0x%02x",samsung_tdtc9251dh0_config.demod_address);
525 } else 525 } else
526 /* try the air atsc 2nd generation (nxt2002) */ 526 /* try the air atsc 2nd generation (nxt2002) */
@@ -532,7 +532,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
532 /* try the air atsc 3nd generation (lgdt3303) */ 532 /* try the air atsc 3nd generation (lgdt3303) */
533 if ((fc->fe = lgdt330x_attach(&air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) { 533 if ((fc->fe = lgdt330x_attach(&air2pc_atsc_hd5000_config, &fc->i2c_adap)) != NULL) {
534 fc->dev_type = FC_AIR_ATSC3; 534 fc->dev_type = FC_AIR_ATSC3;
535 fc->fe->ops->tuner_ops.set_params = lgdt3303_tuner_set_params; 535 fc->fe->ops.tuner_ops.set_params = lgdt3303_tuner_set_params;
536 info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address); 536 info("found the lgdt3303 at i2c address: 0x%02x",air2pc_atsc_hd5000_config.demod_address);
537 } else 537 } else
538 /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */ 538 /* try the air atsc 1nd generation (bcm3510)/panasonic ct10s */
@@ -543,12 +543,12 @@ int flexcop_frontend_init(struct flexcop_device *fc)
543 /* try the cable dvb (stv0297) */ 543 /* try the cable dvb (stv0297) */
544 if ((fc->fe = stv0297_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) { 544 if ((fc->fe = stv0297_attach(&alps_tdee4_stv0297_config, &fc->i2c_adap)) != NULL) {
545 fc->dev_type = FC_CABLE; 545 fc->dev_type = FC_CABLE;
546 fc->fe->ops->tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params; 546 fc->fe->ops.tuner_ops.set_params = alps_tdee4_stv0297_tuner_set_params;
547 info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address); 547 info("found the stv0297 at i2c address: 0x%02x",alps_tdee4_stv0297_config.demod_address);
548 } else 548 } else
549 /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */ 549 /* try the sky v2.3 (vp310/Samsung tbdu18132(tsa5059)) */
550 if ((fc->fe = vp310_mt312_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) { 550 if ((fc->fe = vp310_mt312_attach(&skystar23_samsung_tbdu18132_config, &fc->i2c_adap)) != NULL) {
551 ops = fc->fe->ops; 551 ops = &fc->fe->ops;
552 552
553 ops->tuner_ops.set_params = skystar23_samsung_tbdu18132_tuner_set_params; 553 ops->tuner_ops.set_params = skystar23_samsung_tbdu18132_tuner_set_params;
554 554
@@ -570,7 +570,7 @@ int flexcop_frontend_init(struct flexcop_device *fc)
570 } else { 570 } else {
571 if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) { 571 if (dvb_register_frontend(&fc->dvb_adapter, fc->fe)) {
572 err("frontend registration failed!"); 572 err("frontend registration failed!");
573 ops = fc->fe->ops; 573 ops = &fc->fe->ops;
574 if (ops->release != NULL) 574 if (ops->release != NULL)
575 ops->release(fc->fe); 575 ops->release(fc->fe);
576 fc->fe = NULL; 576 fc->fe = NULL;
diff --git a/drivers/media/dvb/bt8xx/dst.c b/drivers/media/dvb/bt8xx/dst.c
index 1cfa5e5035d8..b2018b5a405b 100644
--- a/drivers/media/dvb/bt8xx/dst.c
+++ b/drivers/media/dvb/bt8xx/dst.c
@@ -1417,24 +1417,22 @@ struct dst_state *dst_attach(struct dst_state *state, struct dvb_adapter *dvb_ad
1417 return NULL; 1417 return NULL;
1418 } 1418 }
1419 /* determine settings based on type */ 1419 /* determine settings based on type */
1420 /* create dvb_frontend */
1420 switch (state->dst_type) { 1421 switch (state->dst_type) {
1421 case DST_TYPE_IS_TERR: 1422 case DST_TYPE_IS_TERR:
1422 memcpy(&state->ops, &dst_dvbt_ops, sizeof(struct dvb_frontend_ops)); 1423 memcpy(&state->frontend.ops, &dst_dvbt_ops, sizeof(struct dvb_frontend_ops));
1423 break; 1424 break;
1424 case DST_TYPE_IS_CABLE: 1425 case DST_TYPE_IS_CABLE:
1425 memcpy(&state->ops, &dst_dvbc_ops, sizeof(struct dvb_frontend_ops)); 1426 memcpy(&state->frontend.ops, &dst_dvbc_ops, sizeof(struct dvb_frontend_ops));
1426 break; 1427 break;
1427 case DST_TYPE_IS_SAT: 1428 case DST_TYPE_IS_SAT:
1428 memcpy(&state->ops, &dst_dvbs_ops, sizeof(struct dvb_frontend_ops)); 1429 memcpy(&state->frontend.ops, &dst_dvbs_ops, sizeof(struct dvb_frontend_ops));
1429 break; 1430 break;
1430 default: 1431 default:
1431 dprintk(verbose, DST_ERROR, 1, "unknown DST type. please report to the LinuxTV.org DVB mailinglist."); 1432 dprintk(verbose, DST_ERROR, 1, "unknown DST type. please report to the LinuxTV.org DVB mailinglist.");
1432 kfree(state); 1433 kfree(state);
1433 return NULL; 1434 return NULL;
1434 } 1435 }
1435
1436 /* create dvb_frontend */
1437 state->frontend.ops = &state->ops;
1438 state->frontend.demodulator_priv = state; 1436 state->frontend.demodulator_priv = state;
1439 1437
1440 return state; /* Manu (DST is a card not a frontend) */ 1438 return state; /* Manu (DST is a card not a frontend) */
diff --git a/drivers/media/dvb/bt8xx/dst_common.h b/drivers/media/dvb/bt8xx/dst_common.h
index 51d4e043716c..5bd1bdc4e5f4 100644
--- a/drivers/media/dvb/bt8xx/dst_common.h
+++ b/drivers/media/dvb/bt8xx/dst_common.h
@@ -84,8 +84,6 @@ struct dst_state {
84 84
85 struct bt878* bt; 85 struct bt878* bt;
86 86
87 struct dvb_frontend_ops ops;
88
89 /* configuration settings */ 87 /* configuration settings */
90 const struct dst_config* config; 88 const struct dst_config* config;
91 89
diff --git a/drivers/media/dvb/bt8xx/dvb-bt8xx.c b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
index 09e18296b3ca..b715b972d2fc 100644
--- a/drivers/media/dvb/bt8xx/dvb-bt8xx.c
+++ b/drivers/media/dvb/bt8xx/dvb-bt8xx.c
@@ -300,8 +300,8 @@ static int microtune_mt7202dtf_tuner_set_params(struct dvb_frontend* fe, struct
300 data[2] = ((div >> 10) & 0x60) | cfg; 300 data[2] = ((div >> 10) & 0x60) | cfg;
301 data[3] = (cpump << 6) | band_select; 301 data[3] = (cpump << 6) | band_select;
302 302
303 if (fe->ops->i2c_gate_ctrl) 303 if (fe->ops.i2c_gate_ctrl)
304 fe->ops->i2c_gate_ctrl(fe, 1); 304 fe->ops.i2c_gate_ctrl(fe, 1);
305 i2c_transfer(card->i2c_adapter, &msg, 1); 305 i2c_transfer(card->i2c_adapter, &msg, 1);
306 return (div * 166666 - 36000000); 306 return (div * 166666 - 36000000);
307} 307}
@@ -483,8 +483,8 @@ static int vp3021_alps_tded4_tuner_set_params(struct dvb_frontend* fe, struct dv
483 else 483 else
484 return -EINVAL; 484 return -EINVAL;
485 485
486 if (fe->ops->i2c_gate_ctrl) 486 if (fe->ops.i2c_gate_ctrl)
487 fe->ops->i2c_gate_ctrl(fe, 1); 487 fe->ops.i2c_gate_ctrl(fe, 1);
488 i2c_transfer(card->i2c_adapter, &msg, 1); 488 i2c_transfer(card->i2c_adapter, &msg, 1);
489 return 0; 489 return 0;
490} 490}
@@ -607,9 +607,9 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
607 card->i2c_adapter); 607 card->i2c_adapter);
608 608
609 if (card->fe != NULL) { 609 if (card->fe != NULL) {
610 card->fe->ops->tuner_ops.calc_regs = thomson_dtt7579_tuner_calc_regs; 610 card->fe->ops.tuner_ops.calc_regs = thomson_dtt7579_tuner_calc_regs;
611 card->fe->ops->info.frequency_min = 174000000; 611 card->fe->ops.info.frequency_min = 174000000;
612 card->fe->ops->info.frequency_max = 862000000; 612 card->fe->ops.info.frequency_max = 862000000;
613 } 613 }
614 break; 614 break;
615 615
@@ -617,7 +617,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
617 lgdt330x_reset(card); 617 lgdt330x_reset(card);
618 card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter); 618 card->fe = lgdt330x_attach(&tdvs_tua6034_config, card->i2c_adapter);
619 if (card->fe != NULL) { 619 if (card->fe != NULL) {
620 card->fe->ops->tuner_ops.set_params = tdvs_tua6034_tuner_set_params; 620 card->fe->ops.tuner_ops.set_params = tdvs_tua6034_tuner_set_params;
621 dprintk ("dvb_bt8xx: lgdt330x detected\n"); 621 dprintk ("dvb_bt8xx: lgdt330x detected\n");
622 } 622 }
623 break; 623 break;
@@ -632,7 +632,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
632 digitv_alps_tded4_reset(card); 632 digitv_alps_tded4_reset(card);
633 card->fe = nxt6000_attach(&vp3021_alps_tded4_config, card->i2c_adapter); 633 card->fe = nxt6000_attach(&vp3021_alps_tded4_config, card->i2c_adapter);
634 if (card->fe != NULL) { 634 if (card->fe != NULL) {
635 card->fe->ops->tuner_ops.set_params = vp3021_alps_tded4_tuner_set_params; 635 card->fe->ops.tuner_ops.set_params = vp3021_alps_tded4_tuner_set_params;
636 dprintk ("dvb_bt8xx: an nxt6000 was detected on your digitv card\n"); 636 dprintk ("dvb_bt8xx: an nxt6000 was detected on your digitv card\n");
637 break; 637 break;
638 } 638 }
@@ -642,7 +642,7 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
642 card->fe = mt352_attach(&digitv_alps_tded4_config, card->i2c_adapter); 642 card->fe = mt352_attach(&digitv_alps_tded4_config, card->i2c_adapter);
643 643
644 if (card->fe != NULL) { 644 if (card->fe != NULL) {
645 card->fe->ops->tuner_ops.calc_regs = digitv_alps_tded4_tuner_calc_regs; 645 card->fe->ops.tuner_ops.calc_regs = digitv_alps_tded4_tuner_calc_regs;
646 dprintk ("dvb_bt8xx: an mt352 was detected on your digitv card\n"); 646 dprintk ("dvb_bt8xx: an mt352 was detected on your digitv card\n");
647 } 647 }
648 break; 648 break;
@@ -650,16 +650,16 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
650 case BTTV_BOARD_AVDVBT_761: 650 case BTTV_BOARD_AVDVBT_761:
651 card->fe = sp887x_attach(&microtune_mt7202dtf_config, card->i2c_adapter); 651 card->fe = sp887x_attach(&microtune_mt7202dtf_config, card->i2c_adapter);
652 if (card->fe) { 652 if (card->fe) {
653 card->fe->ops->tuner_ops.set_params = microtune_mt7202dtf_tuner_set_params; 653 card->fe->ops.tuner_ops.set_params = microtune_mt7202dtf_tuner_set_params;
654 } 654 }
655 break; 655 break;
656 656
657 case BTTV_BOARD_AVDVBT_771: 657 case BTTV_BOARD_AVDVBT_771:
658 card->fe = mt352_attach(&advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter); 658 card->fe = mt352_attach(&advbt771_samsung_tdtc9251dh0_config, card->i2c_adapter);
659 if (card->fe != NULL) { 659 if (card->fe != NULL) {
660 card->fe->ops->tuner_ops.calc_regs = advbt771_samsung_tdtc9251dh0_tuner_calc_regs; 660 card->fe->ops.tuner_ops.calc_regs = advbt771_samsung_tdtc9251dh0_tuner_calc_regs;
661 card->fe->ops->info.frequency_min = 174000000; 661 card->fe->ops.info.frequency_min = 174000000;
662 card->fe->ops->info.frequency_max = 862000000; 662 card->fe->ops.info.frequency_max = 862000000;
663 } 663 }
664 break; 664 break;
665 665
@@ -687,9 +687,9 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
687 case BTTV_BOARD_PINNACLESAT: 687 case BTTV_BOARD_PINNACLESAT:
688 card->fe = cx24110_attach(&pctvsat_config, card->i2c_adapter); 688 card->fe = cx24110_attach(&pctvsat_config, card->i2c_adapter);
689 if (card->fe) { 689 if (card->fe) {
690 card->fe->ops->tuner_ops.init = pinnsat_tuner_init; 690 card->fe->ops.tuner_ops.init = pinnsat_tuner_init;
691 card->fe->ops->tuner_ops.sleep = pinnsat_tuner_sleep; 691 card->fe->ops.tuner_ops.sleep = pinnsat_tuner_sleep;
692 card->fe->ops->tuner_ops.set_params = cx24108_tuner_set_params; 692 card->fe->ops.tuner_ops.set_params = cx24108_tuner_set_params;
693 } 693 }
694 break; 694 break;
695 695
@@ -707,8 +707,8 @@ static void frontend_init(struct dvb_bt8xx_card *card, u32 type)
707 else 707 else
708 if (dvb_register_frontend(&card->dvb_adapter, card->fe)) { 708 if (dvb_register_frontend(&card->dvb_adapter, card->fe)) {
709 printk("dvb-bt8xx: Frontend registration failed!\n"); 709 printk("dvb-bt8xx: Frontend registration failed!\n");
710 if (card->fe->ops->release) 710 if (card->fe->ops.release)
711 card->fe->ops->release(card->fe); 711 card->fe->ops.release(card->fe);
712 card->fe = NULL; 712 card->fe = NULL;
713 } 713 }
714} 714}
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c
index bbf441215e79..498d21bd9271 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -151,8 +151,8 @@ static void dvb_frontend_add_event(struct dvb_frontend *fe, fe_status_t status)
151 sizeof (struct dvb_frontend_parameters)); 151 sizeof (struct dvb_frontend_parameters));
152 152
153 if (status & FE_HAS_LOCK) 153 if (status & FE_HAS_LOCK)
154 if (fe->ops->get_frontend) 154 if (fe->ops.get_frontend)
155 fe->ops->get_frontend(fe, &e->parameters); 155 fe->ops.get_frontend(fe, &e->parameters);
156 156
157 events->eventw = wp; 157 events->eventw = wp;
158 158
@@ -211,14 +211,14 @@ static void dvb_frontend_init(struct dvb_frontend *fe)
211{ 211{
212 dprintk ("DVB: initialising frontend %i (%s)...\n", 212 dprintk ("DVB: initialising frontend %i (%s)...\n",
213 fe->dvb->num, 213 fe->dvb->num,
214 fe->ops->info.name); 214 fe->ops.info.name);
215 215
216 if (fe->ops->init) 216 if (fe->ops.init)
217 fe->ops->init(fe); 217 fe->ops.init(fe);
218 if (fe->ops->tuner_ops.init) { 218 if (fe->ops.tuner_ops.init) {
219 fe->ops->tuner_ops.init(fe); 219 fe->ops.tuner_ops.init(fe);
220 if (fe->ops->i2c_gate_ctrl) 220 if (fe->ops.i2c_gate_ctrl)
221 fe->ops->i2c_gate_ctrl(fe, 0); 221 fe->ops.i2c_gate_ctrl(fe, 0);
222 } 222 }
223} 223}
224 224
@@ -264,7 +264,7 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
264 u32 original_frequency = fepriv->parameters.frequency; 264 u32 original_frequency = fepriv->parameters.frequency;
265 265
266 /* are we using autoinversion? */ 266 /* are we using autoinversion? */
267 autoinversion = ((!(fe->ops->info.caps & FE_CAN_INVERSION_AUTO)) && 267 autoinversion = ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) &&
268 (fepriv->parameters.inversion == INVERSION_AUTO)); 268 (fepriv->parameters.inversion == INVERSION_AUTO));
269 269
270 /* setup parameters correctly */ 270 /* setup parameters correctly */
@@ -334,8 +334,8 @@ static int dvb_frontend_swzigzag_autotune(struct dvb_frontend *fe, int check_wra
334 fepriv->parameters.frequency += fepriv->lnb_drift; 334 fepriv->parameters.frequency += fepriv->lnb_drift;
335 if (autoinversion) 335 if (autoinversion)
336 fepriv->parameters.inversion = fepriv->inversion; 336 fepriv->parameters.inversion = fepriv->inversion;
337 if (fe->ops->set_frontend) 337 if (fe->ops.set_frontend)
338 fe->ops->set_frontend(fe, &fepriv->parameters); 338 fe->ops.set_frontend(fe, &fepriv->parameters);
339 339
340 fepriv->parameters.frequency = original_frequency; 340 fepriv->parameters.frequency = original_frequency;
341 fepriv->parameters.inversion = original_inversion; 341 fepriv->parameters.inversion = original_inversion;
@@ -359,8 +359,8 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
359 /* in SCAN mode, we just set the frontend when asked and leave it alone */ 359 /* in SCAN mode, we just set the frontend when asked and leave it alone */
360 if (fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT) { 360 if (fepriv->tune_mode_flags & FE_TUNE_MODE_ONESHOT) {
361 if (fepriv->state & FESTATE_RETUNE) { 361 if (fepriv->state & FESTATE_RETUNE) {
362 if (fe->ops->set_frontend) 362 if (fe->ops.set_frontend)
363 fe->ops->set_frontend(fe, &fepriv->parameters); 363 fe->ops.set_frontend(fe, &fepriv->parameters);
364 fepriv->state = FESTATE_TUNED; 364 fepriv->state = FESTATE_TUNED;
365 } 365 }
366 fepriv->delay = 3*HZ; 366 fepriv->delay = 3*HZ;
@@ -372,8 +372,8 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
372 if (fepriv->state & FESTATE_RETUNE) { 372 if (fepriv->state & FESTATE_RETUNE) {
373 s = 0; 373 s = 0;
374 } else { 374 } else {
375 if (fe->ops->read_status) 375 if (fe->ops.read_status)
376 fe->ops->read_status(fe, &s); 376 fe->ops.read_status(fe, &s);
377 if (s != fepriv->status) { 377 if (s != fepriv->status) {
378 dvb_frontend_add_event(fe, s); 378 dvb_frontend_add_event(fe, s);
379 fepriv->status = s; 379 fepriv->status = s;
@@ -386,7 +386,7 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
386 fepriv->state = FESTATE_TUNED; 386 fepriv->state = FESTATE_TUNED;
387 387
388 /* if we're tuned, then we have determined the correct inversion */ 388 /* if we're tuned, then we have determined the correct inversion */
389 if ((!(fe->ops->info.caps & FE_CAN_INVERSION_AUTO)) && 389 if ((!(fe->ops.info.caps & FE_CAN_INVERSION_AUTO)) &&
390 (fepriv->parameters.inversion == INVERSION_AUTO)) { 390 (fepriv->parameters.inversion == INVERSION_AUTO)) {
391 fepriv->parameters.inversion = fepriv->inversion; 391 fepriv->parameters.inversion = fepriv->inversion;
392 } 392 }
@@ -410,7 +410,7 @@ static void dvb_frontend_swzigzag(struct dvb_frontend *fe)
410 /* don't actually do anything if we're in the LOSTLOCK state, 410 /* don't actually do anything if we're in the LOSTLOCK state,
411 * the frontend is set to FE_CAN_RECOVER, and the max_drift is 0 */ 411 * the frontend is set to FE_CAN_RECOVER, and the max_drift is 0 */
412 if ((fepriv->state & FESTATE_LOSTLOCK) && 412 if ((fepriv->state & FESTATE_LOSTLOCK) &&
413 (fe->ops->info.caps & FE_CAN_RECOVER) && (fepriv->max_drift == 0)) { 413 (fe->ops.info.caps & FE_CAN_RECOVER) && (fepriv->max_drift == 0)) {
414 dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK); 414 dvb_frontend_swzigzag_update_delay(fepriv, s & FE_HAS_LOCK);
415 return; 415 return;
416 } 416 }
@@ -545,16 +545,16 @@ static int dvb_frontend_thread(void *data)
545 if (fepriv->reinitialise) { 545 if (fepriv->reinitialise) {
546 dvb_frontend_init(fe); 546 dvb_frontend_init(fe);
547 if (fepriv->tone != -1) { 547 if (fepriv->tone != -1) {
548 fe->ops->set_tone(fe, fepriv->tone); 548 fe->ops.set_tone(fe, fepriv->tone);
549 } 549 }
550 if (fepriv->voltage != -1) { 550 if (fepriv->voltage != -1) {
551 fe->ops->set_voltage(fe, fepriv->voltage); 551 fe->ops.set_voltage(fe, fepriv->voltage);
552 } 552 }
553 fepriv->reinitialise = 0; 553 fepriv->reinitialise = 0;
554 } 554 }
555 555
556 /* do an iteration of the tuning loop */ 556 /* do an iteration of the tuning loop */
557 if (fe->ops->tune) { 557 if (fe->ops.tune) {
558 /* have we been asked to retune? */ 558 /* have we been asked to retune? */
559 params = NULL; 559 params = NULL;
560 if (fepriv->state & FESTATE_RETUNE) { 560 if (fepriv->state & FESTATE_RETUNE) {
@@ -562,7 +562,7 @@ static int dvb_frontend_thread(void *data)
562 fepriv->state = FESTATE_TUNED; 562 fepriv->state = FESTATE_TUNED;
563 } 563 }
564 564
565 fe->ops->tune(fe, params, fepriv->tune_mode_flags, &fepriv->delay, &s); 565 fe->ops.tune(fe, params, fepriv->tune_mode_flags, &fepriv->delay, &s);
566 if (s != fepriv->status) { 566 if (s != fepriv->status) {
567 dvb_frontend_add_event(fe, s); 567 dvb_frontend_add_event(fe, s);
568 fepriv->status = s; 568 fepriv->status = s;
@@ -574,15 +574,15 @@ static int dvb_frontend_thread(void *data)
574 574
575 if (dvb_shutdown_timeout) { 575 if (dvb_shutdown_timeout) {
576 if (dvb_powerdown_on_sleep) 576 if (dvb_powerdown_on_sleep)
577 if (fe->ops->set_voltage) 577 if (fe->ops.set_voltage)
578 fe->ops->set_voltage(fe, SEC_VOLTAGE_OFF); 578 fe->ops.set_voltage(fe, SEC_VOLTAGE_OFF);
579 if (fe->ops->tuner_ops.sleep) { 579 if (fe->ops.tuner_ops.sleep) {
580 fe->ops->tuner_ops.sleep(fe); 580 fe->ops.tuner_ops.sleep(fe);
581 if (fe->ops->i2c_gate_ctrl) 581 if (fe->ops.i2c_gate_ctrl)
582 fe->ops->i2c_gate_ctrl(fe, 0); 582 fe->ops.i2c_gate_ctrl(fe, 0);
583 } 583 }
584 if (fe->ops->sleep) 584 if (fe->ops.sleep)
585 fe->ops->sleep(fe); 585 fe->ops.sleep(fe);
586 } 586 }
587 587
588 fepriv->thread_pid = 0; 588 fepriv->thread_pid = 0;
@@ -734,7 +734,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
734 switch (cmd) { 734 switch (cmd) {
735 case FE_GET_INFO: { 735 case FE_GET_INFO: {
736 struct dvb_frontend_info* info = parg; 736 struct dvb_frontend_info* info = parg;
737 memcpy(info, &fe->ops->info, sizeof(struct dvb_frontend_info)); 737 memcpy(info, &fe->ops.info, sizeof(struct dvb_frontend_info));
738 738
739 /* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't 739 /* Force the CAN_INVERSION_AUTO bit on. If the frontend doesn't
740 * do it, it is done for it. */ 740 * do it, it is done for it. */
@@ -754,58 +754,58 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
754 break; 754 break;
755 } 755 }
756 756
757 if (fe->ops->read_status) 757 if (fe->ops.read_status)
758 err = fe->ops->read_status(fe, status); 758 err = fe->ops.read_status(fe, status);
759 break; 759 break;
760 } 760 }
761 case FE_READ_BER: 761 case FE_READ_BER:
762 if (fe->ops->read_ber) 762 if (fe->ops.read_ber)
763 err = fe->ops->read_ber(fe, (__u32*) parg); 763 err = fe->ops.read_ber(fe, (__u32*) parg);
764 break; 764 break;
765 765
766 case FE_READ_SIGNAL_STRENGTH: 766 case FE_READ_SIGNAL_STRENGTH:
767 if (fe->ops->read_signal_strength) 767 if (fe->ops.read_signal_strength)
768 err = fe->ops->read_signal_strength(fe, (__u16*) parg); 768 err = fe->ops.read_signal_strength(fe, (__u16*) parg);
769 break; 769 break;
770 770
771 case FE_READ_SNR: 771 case FE_READ_SNR:
772 if (fe->ops->read_snr) 772 if (fe->ops.read_snr)
773 err = fe->ops->read_snr(fe, (__u16*) parg); 773 err = fe->ops.read_snr(fe, (__u16*) parg);
774 break; 774 break;
775 775
776 case FE_READ_UNCORRECTED_BLOCKS: 776 case FE_READ_UNCORRECTED_BLOCKS:
777 if (fe->ops->read_ucblocks) 777 if (fe->ops.read_ucblocks)
778 err = fe->ops->read_ucblocks(fe, (__u32*) parg); 778 err = fe->ops.read_ucblocks(fe, (__u32*) parg);
779 break; 779 break;
780 780
781 781
782 case FE_DISEQC_RESET_OVERLOAD: 782 case FE_DISEQC_RESET_OVERLOAD:
783 if (fe->ops->diseqc_reset_overload) { 783 if (fe->ops.diseqc_reset_overload) {
784 err = fe->ops->diseqc_reset_overload(fe); 784 err = fe->ops.diseqc_reset_overload(fe);
785 fepriv->state = FESTATE_DISEQC; 785 fepriv->state = FESTATE_DISEQC;
786 fepriv->status = 0; 786 fepriv->status = 0;
787 } 787 }
788 break; 788 break;
789 789
790 case FE_DISEQC_SEND_MASTER_CMD: 790 case FE_DISEQC_SEND_MASTER_CMD:
791 if (fe->ops->diseqc_send_master_cmd) { 791 if (fe->ops.diseqc_send_master_cmd) {
792 err = fe->ops->diseqc_send_master_cmd(fe, (struct dvb_diseqc_master_cmd*) parg); 792 err = fe->ops.diseqc_send_master_cmd(fe, (struct dvb_diseqc_master_cmd*) parg);
793 fepriv->state = FESTATE_DISEQC; 793 fepriv->state = FESTATE_DISEQC;
794 fepriv->status = 0; 794 fepriv->status = 0;
795 } 795 }
796 break; 796 break;
797 797
798 case FE_DISEQC_SEND_BURST: 798 case FE_DISEQC_SEND_BURST:
799 if (fe->ops->diseqc_send_burst) { 799 if (fe->ops.diseqc_send_burst) {
800 err = fe->ops->diseqc_send_burst(fe, (fe_sec_mini_cmd_t) parg); 800 err = fe->ops.diseqc_send_burst(fe, (fe_sec_mini_cmd_t) parg);
801 fepriv->state = FESTATE_DISEQC; 801 fepriv->state = FESTATE_DISEQC;
802 fepriv->status = 0; 802 fepriv->status = 0;
803 } 803 }
804 break; 804 break;
805 805
806 case FE_SET_TONE: 806 case FE_SET_TONE:
807 if (fe->ops->set_tone) { 807 if (fe->ops.set_tone) {
808 err = fe->ops->set_tone(fe, (fe_sec_tone_mode_t) parg); 808 err = fe->ops.set_tone(fe, (fe_sec_tone_mode_t) parg);
809 fepriv->tone = (fe_sec_tone_mode_t) parg; 809 fepriv->tone = (fe_sec_tone_mode_t) parg;
810 fepriv->state = FESTATE_DISEQC; 810 fepriv->state = FESTATE_DISEQC;
811 fepriv->status = 0; 811 fepriv->status = 0;
@@ -813,8 +813,8 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
813 break; 813 break;
814 814
815 case FE_SET_VOLTAGE: 815 case FE_SET_VOLTAGE:
816 if (fe->ops->set_voltage) { 816 if (fe->ops.set_voltage) {
817 err = fe->ops->set_voltage(fe, (fe_sec_voltage_t) parg); 817 err = fe->ops.set_voltage(fe, (fe_sec_voltage_t) parg);
818 fepriv->voltage = (fe_sec_voltage_t) parg; 818 fepriv->voltage = (fe_sec_voltage_t) parg;
819 fepriv->state = FESTATE_DISEQC; 819 fepriv->state = FESTATE_DISEQC;
820 fepriv->status = 0; 820 fepriv->status = 0;
@@ -822,11 +822,11 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
822 break; 822 break;
823 823
824 case FE_DISHNETWORK_SEND_LEGACY_CMD: 824 case FE_DISHNETWORK_SEND_LEGACY_CMD:
825 if (fe->ops->dishnetwork_send_legacy_command) { 825 if (fe->ops.dishnetwork_send_legacy_command) {
826 err = fe->ops->dishnetwork_send_legacy_command(fe, (unsigned long) parg); 826 err = fe->ops.dishnetwork_send_legacy_command(fe, (unsigned long) parg);
827 fepriv->state = FESTATE_DISEQC; 827 fepriv->state = FESTATE_DISEQC;
828 fepriv->status = 0; 828 fepriv->status = 0;
829 } else if (fe->ops->set_voltage) { 829 } else if (fe->ops.set_voltage) {
830 /* 830 /*
831 * NOTE: This is a fallback condition. Some frontends 831 * NOTE: This is a fallback condition. Some frontends
832 * (stv0299 for instance) take longer than 8msec to 832 * (stv0299 for instance) take longer than 8msec to
@@ -856,7 +856,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
856 /* before sending a command, initialize by sending 856 /* before sending a command, initialize by sending
857 * a 32ms 18V to the switch 857 * a 32ms 18V to the switch
858 */ 858 */
859 fe->ops->set_voltage(fe, SEC_VOLTAGE_18); 859 fe->ops.set_voltage(fe, SEC_VOLTAGE_18);
860 dvb_frontend_sleep_until(&nexttime, 32000); 860 dvb_frontend_sleep_until(&nexttime, 32000);
861 861
862 for (i = 0; i < 9; i++) { 862 for (i = 0; i < 9; i++) {
@@ -864,7 +864,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
864 do_gettimeofday(&tv[i + 1]); 864 do_gettimeofday(&tv[i + 1]);
865 if ((cmd & 0x01) != last) { 865 if ((cmd & 0x01) != last) {
866 /* set voltage to (last ? 13V : 18V) */ 866 /* set voltage to (last ? 13V : 18V) */
867 fe->ops->set_voltage(fe, (last) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18); 867 fe->ops.set_voltage(fe, (last) ? SEC_VOLTAGE_13 : SEC_VOLTAGE_18);
868 last = (last) ? 0 : 1; 868 last = (last) ? 0 : 1;
869 } 869 }
870 cmd = cmd >> 1; 870 cmd = cmd >> 1;
@@ -884,13 +884,13 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
884 break; 884 break;
885 885
886 case FE_DISEQC_RECV_SLAVE_REPLY: 886 case FE_DISEQC_RECV_SLAVE_REPLY:
887 if (fe->ops->diseqc_recv_slave_reply) 887 if (fe->ops.diseqc_recv_slave_reply)
888 err = fe->ops->diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg); 888 err = fe->ops.diseqc_recv_slave_reply(fe, (struct dvb_diseqc_slave_reply*) parg);
889 break; 889 break;
890 890
891 case FE_ENABLE_HIGH_LNB_VOLTAGE: 891 case FE_ENABLE_HIGH_LNB_VOLTAGE:
892 if (fe->ops->enable_high_lnb_voltage) 892 if (fe->ops.enable_high_lnb_voltage)
893 err = fe->ops->enable_high_lnb_voltage(fe, (long) parg); 893 err = fe->ops.enable_high_lnb_voltage(fe, (long) parg);
894 break; 894 break;
895 895
896 case FE_SET_FRONTEND: { 896 case FE_SET_FRONTEND: {
@@ -908,7 +908,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
908 fepriv->parameters.inversion = INVERSION_AUTO; 908 fepriv->parameters.inversion = INVERSION_AUTO;
909 fetunesettings.parameters.inversion = INVERSION_AUTO; 909 fetunesettings.parameters.inversion = INVERSION_AUTO;
910 } 910 }
911 if (fe->ops->info.type == FE_OFDM) { 911 if (fe->ops.info.type == FE_OFDM) {
912 /* without hierachical coding code_rate_LP is irrelevant, 912 /* without hierachical coding code_rate_LP is irrelevant,
913 * so we tolerate the otherwise invalid FEC_NONE setting */ 913 * so we tolerate the otherwise invalid FEC_NONE setting */
914 if (fepriv->parameters.u.ofdm.hierarchy_information == HIERARCHY_NONE && 914 if (fepriv->parameters.u.ofdm.hierarchy_information == HIERARCHY_NONE &&
@@ -917,13 +917,13 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
917 } 917 }
918 918
919 /* get frontend-specific tuning settings */ 919 /* get frontend-specific tuning settings */
920 if (fe->ops->get_tune_settings && (fe->ops->get_tune_settings(fe, &fetunesettings) == 0)) { 920 if (fe->ops.get_tune_settings && (fe->ops.get_tune_settings(fe, &fetunesettings) == 0)) {
921 fepriv->min_delay = (fetunesettings.min_delay_ms * HZ) / 1000; 921 fepriv->min_delay = (fetunesettings.min_delay_ms * HZ) / 1000;
922 fepriv->max_drift = fetunesettings.max_drift; 922 fepriv->max_drift = fetunesettings.max_drift;
923 fepriv->step_size = fetunesettings.step_size; 923 fepriv->step_size = fetunesettings.step_size;
924 } else { 924 } else {
925 /* default values */ 925 /* default values */
926 switch(fe->ops->info.type) { 926 switch(fe->ops.info.type) {
927 case FE_QPSK: 927 case FE_QPSK:
928 fepriv->min_delay = HZ/20; 928 fepriv->min_delay = HZ/20;
929 fepriv->step_size = fepriv->parameters.u.qpsk.symbol_rate / 16000; 929 fepriv->step_size = fepriv->parameters.u.qpsk.symbol_rate / 16000;
@@ -938,8 +938,8 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
938 938
939 case FE_OFDM: 939 case FE_OFDM:
940 fepriv->min_delay = HZ/20; 940 fepriv->min_delay = HZ/20;
941 fepriv->step_size = fe->ops->info.frequency_stepsize * 2; 941 fepriv->step_size = fe->ops.info.frequency_stepsize * 2;
942 fepriv->max_drift = (fe->ops->info.frequency_stepsize * 2) + 1; 942 fepriv->max_drift = (fe->ops.info.frequency_stepsize * 2) + 1;
943 break; 943 break;
944 case FE_ATSC: 944 case FE_ATSC:
945 printk("dvb-core: FE_ATSC not handled yet.\n"); 945 printk("dvb-core: FE_ATSC not handled yet.\n");
@@ -962,9 +962,9 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
962 break; 962 break;
963 963
964 case FE_GET_FRONTEND: 964 case FE_GET_FRONTEND:
965 if (fe->ops->get_frontend) { 965 if (fe->ops.get_frontend) {
966 memcpy (parg, &fepriv->parameters, sizeof (struct dvb_frontend_parameters)); 966 memcpy (parg, &fepriv->parameters, sizeof (struct dvb_frontend_parameters));
967 err = fe->ops->get_frontend(fe, (struct dvb_frontend_parameters*) parg); 967 err = fe->ops.get_frontend(fe, (struct dvb_frontend_parameters*) parg);
968 } 968 }
969 break; 969 break;
970 970
@@ -1077,7 +1077,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
1077 1077
1078 printk ("DVB: registering frontend %i (%s)...\n", 1078 printk ("DVB: registering frontend %i (%s)...\n",
1079 fe->dvb->num, 1079 fe->dvb->num,
1080 fe->ops->info.name); 1080 fe->ops.info.name);
1081 1081
1082 dvb_register_device (fe->dvb, &fepriv->dvbdev, &dvbdev_template, 1082 dvb_register_device (fe->dvb, &fepriv->dvbdev, &dvbdev_template,
1083 fe, DVB_DEVICE_FRONTEND); 1083 fe, DVB_DEVICE_FRONTEND);
@@ -1095,15 +1095,15 @@ int dvb_unregister_frontend(struct dvb_frontend* fe)
1095 mutex_lock(&frontend_mutex); 1095 mutex_lock(&frontend_mutex);
1096 dvb_unregister_device (fepriv->dvbdev); 1096 dvb_unregister_device (fepriv->dvbdev);
1097 dvb_frontend_stop (fe); 1097 dvb_frontend_stop (fe);
1098 if (fe->ops->tuner_ops.release) { 1098 if (fe->ops.tuner_ops.release) {
1099 fe->ops->tuner_ops.release(fe); 1099 fe->ops.tuner_ops.release(fe);
1100 if (fe->ops->i2c_gate_ctrl) 1100 if (fe->ops.i2c_gate_ctrl)
1101 fe->ops->i2c_gate_ctrl(fe, 0); 1101 fe->ops.i2c_gate_ctrl(fe, 0);
1102 } 1102 }
1103 if (fe->ops->release) 1103 if (fe->ops.release)
1104 fe->ops->release(fe); 1104 fe->ops.release(fe);
1105 else 1105 else
1106 printk("dvb_frontend: Demodulator (%s) does not have a release callback!\n", fe->ops->info.name); 1106 printk("dvb_frontend: Demodulator (%s) does not have a release callback!\n", fe->ops.info.name);
1107 /* fe is invalid now */ 1107 /* fe is invalid now */
1108 kfree(fepriv); 1108 kfree(fepriv);
1109 mutex_unlock(&frontend_mutex); 1109 mutex_unlock(&frontend_mutex);
diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.h b/drivers/media/dvb/dvb-core/dvb_frontend.h
index 05ec9954b158..fee52baa148a 100644
--- a/drivers/media/dvb/dvb-core/dvb_frontend.h
+++ b/drivers/media/dvb/dvb-core/dvb_frontend.h
@@ -140,7 +140,7 @@ struct dvb_fe_events {
140}; 140};
141 141
142struct dvb_frontend { 142struct dvb_frontend {
143 struct dvb_frontend_ops* ops; 143 struct dvb_frontend_ops ops;
144 struct dvb_adapter *dvb; 144 struct dvb_adapter *dvb;
145 void* demodulator_priv; 145 void* demodulator_priv;
146 void* tuner_priv; 146 void* tuner_priv;
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c
index 500785e41e28..d0063ae120bd 100644
--- a/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/drivers/media/dvb/dvb-usb/cxusb.c
@@ -360,8 +360,8 @@ static int cxusb_fmd1216me_tuner_attach(struct dvb_usb_device *d)
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 362
363 d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c; 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; 364 d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
365 365
366 return 0; 366 return 0;
367} 367}
@@ -370,7 +370,7 @@ static int cxusb_dee1601_tuner_attach(struct dvb_usb_device *d)
370{ 370{
371 d->pll_addr = 0x61; 371 d->pll_addr = 0x61;
372 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; 373 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
374 return 0; 374 return 0;
375} 375}
376 376
@@ -378,7 +378,7 @@ static int cxusb_lgz201_tuner_attach(struct dvb_usb_device *d)
378{ 378{
379 d->pll_addr = 0x61; 379 d->pll_addr = 0x61;
380 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; 381 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
382 return 0; 382 return 0;
383} 383}
384 384
@@ -386,13 +386,13 @@ static int cxusb_dtt7579_tuner_attach(struct dvb_usb_device *d)
386{ 386{
387 d->pll_addr = 0x60; 387 d->pll_addr = 0x60;
388 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; 389 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
390 return 0; 390 return 0;
391} 391}
392 392
393static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d) 393static int cxusb_lgdt3303_tuner_attach(struct dvb_usb_device *d)
394{ 394{
395 d->fe->ops->tuner_ops.set_params = cxusb_lgh064f_tuner_set_params; 395 d->fe->ops.tuner_ops.set_params = cxusb_lgh064f_tuner_set_params;
396 return 0; 396 return 0;
397} 397}
398 398
diff --git a/drivers/media/dvb/dvb-usb/dibusb-mb.c b/drivers/media/dvb/dvb-usb/dibusb-mb.c
index def0c111ce0a..f4c45f386ebc 100644
--- a/drivers/media/dvb/dvb-usb/dibusb-mb.c
+++ b/drivers/media/dvb/dvb-usb/dibusb-mb.c
@@ -20,11 +20,12 @@ static int dibusb_dib3000mb_frontend_attach(struct dvb_usb_device *d)
20 struct dibusb_state *st = d->priv; 20 struct dibusb_state *st = d->priv;
21 21
22 demod_cfg.demod_address = 0x8; 22 demod_cfg.demod_address = 0x8;
23 d->fe->ops->tuner_ops.init = dvb_usb_tuner_init_i2c;
24 d->fe->ops->tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
25 23
26 if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) 24 if ((d->fe = dib3000mb_attach(&demod_cfg,&d->i2c_adap,&st->ops)) == NULL) {
25 d->fe->ops.tuner_ops.init = dvb_usb_tuner_init_i2c;
26 d->fe->ops.tuner_ops.set_params = dvb_usb_tuner_set_params_i2c;
27 return -ENODEV; 27 return -ENODEV;
28 }
28 29
29 d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl; 30 d->tuner_pass_ctrl = st->ops.tuner_pass_ctrl;
30 31
diff --git a/drivers/media/dvb/dvb-usb/digitv.c b/drivers/media/dvb/dvb-usb/digitv.c
index 56814ba8037b..c14d9efb48fd 100644
--- a/drivers/media/dvb/dvb-usb/digitv.c
+++ b/drivers/media/dvb/dvb-usb/digitv.c
@@ -129,11 +129,11 @@ static struct nxt6000_config digitv_nxt6000_config = {
129static int digitv_frontend_attach(struct dvb_usb_device *d) 129static int digitv_frontend_attach(struct dvb_usb_device *d)
130{ 130{
131 if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL) { 131 if ((d->fe = mt352_attach(&digitv_mt352_config, &d->i2c_adap)) != NULL) {
132 d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; 132 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
133 return 0; 133 return 0;
134 } 134 }
135 if ((d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) { 135 if ((d->fe = nxt6000_attach(&digitv_nxt6000_config, &d->i2c_adap)) != NULL) {
136 d->fe->ops->tuner_ops.set_params = digitv_nxt6000_tuner_set_params; 136 d->fe->ops.tuner_ops.set_params = digitv_nxt6000_tuner_set_params;
137 return 0; 137 return 0;
138 } 138 }
139 return -EIO; 139 return -EIO;
diff --git a/drivers/media/dvb/dvb-usb/dtt200u-fe.c b/drivers/media/dvb/dvb-usb/dtt200u-fe.c
index 2df6da2b54f8..17413adec7a1 100644
--- a/drivers/media/dvb/dvb-usb/dtt200u-fe.c
+++ b/drivers/media/dvb/dvb-usb/dtt200u-fe.c
@@ -18,7 +18,6 @@ struct dtt200u_fe_state {
18 18
19 struct dvb_frontend_parameters fep; 19 struct dvb_frontend_parameters fep;
20 struct dvb_frontend frontend; 20 struct dvb_frontend frontend;
21 struct dvb_frontend_ops ops;
22}; 21};
23 22
24static int dtt200u_fe_read_status(struct dvb_frontend* fe, fe_status_t *stat) 23static int dtt200u_fe_read_status(struct dvb_frontend* fe, fe_status_t *stat)
@@ -163,9 +162,8 @@ struct dvb_frontend* dtt200u_fe_attach(struct dvb_usb_device *d)
163 deb_info("attaching frontend dtt200u\n"); 162 deb_info("attaching frontend dtt200u\n");
164 163
165 state->d = d; 164 state->d = d;
166 memcpy(&state->ops,&dtt200u_fe_ops,sizeof(struct dvb_frontend_ops));
167 165
168 state->frontend.ops = &state->ops; 166 memcpy(&state->frontend.ops,&dtt200u_fe_ops,sizeof(struct dvb_frontend_ops));
169 state->frontend.demodulator_priv = state; 167 state->frontend.demodulator_priv = state;
170 168
171 return &state->frontend; 169 return &state->frontend;
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
index 2517b228381d..ec631708c394 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-dvb.c
@@ -183,13 +183,13 @@ int dvb_usb_fe_init(struct dvb_usb_device* d)
183 183
184 /* re-assign sleep and wakeup functions */ 184 /* re-assign sleep and wakeup functions */
185 if (d->fe != NULL) { 185 if (d->fe != NULL) {
186 d->fe_init = d->fe->ops->init; d->fe->ops->init = dvb_usb_fe_wakeup; 186 d->fe_init = d->fe->ops.init; d->fe->ops.init = dvb_usb_fe_wakeup;
187 d->fe_sleep = d->fe->ops->sleep; d->fe->ops->sleep = dvb_usb_fe_sleep; 187 d->fe_sleep = d->fe->ops.sleep; d->fe->ops.sleep = dvb_usb_fe_sleep;
188 188
189 if (dvb_register_frontend(&d->dvb_adap, d->fe)) { 189 if (dvb_register_frontend(&d->dvb_adap, d->fe)) {
190 err("Frontend registration failed."); 190 err("Frontend registration failed.");
191 if (d->fe->ops->release) 191 if (d->fe->ops.release)
192 d->fe->ops->release(d->fe); 192 d->fe->ops.release(d->fe);
193 d->fe = NULL; 193 d->fe = NULL;
194 return -ENODEV; 194 return -ENODEV;
195 } 195 }
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index 6c868d667424..6b611a725093 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
@@ -63,8 +63,8 @@ int dvb_usb_tuner_init_i2c(struct dvb_frontend *fe)
63 deb_pll("pll-buf: %x %x %x %x\n",d->pll_init[0],d->pll_init[1], 63 deb_pll("pll-buf: %x %x %x %x\n",d->pll_init[0],d->pll_init[1],
64 d->pll_init[2],d->pll_init[3]); 64 d->pll_init[2],d->pll_init[3]);
65 65
66 if (fe->ops->i2c_gate_ctrl) 66 if (fe->ops.i2c_gate_ctrl)
67 fe->ops->i2c_gate_ctrl(fe, 1); 67 fe->ops.i2c_gate_ctrl(fe, 1);
68 if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) { 68 if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) {
69 err("tuner i2c write failed for pll_init."); 69 err("tuner i2c write failed for pll_init.");
70 ret = -EREMOTEIO; 70 ret = -EREMOTEIO;
@@ -109,8 +109,8 @@ int dvb_usb_tuner_set_params_i2c(struct dvb_frontend *fe, struct dvb_frontend_pa
109 if (d->tuner_pass_ctrl) 109 if (d->tuner_pass_ctrl)
110 d->tuner_pass_ctrl(fe,1,d->pll_addr); 110 d->tuner_pass_ctrl(fe,1,d->pll_addr);
111 111
112 if (fe->ops->i2c_gate_ctrl) 112 if (fe->ops.i2c_gate_ctrl)
113 fe->ops->i2c_gate_ctrl(fe, 1); 113 fe->ops.i2c_gate_ctrl(fe, 1);
114 if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) { 114 if (i2c_transfer (&d->i2c_adap, &msg, 1) != 1) {
115 err("tuner i2c write failed for pll_set."); 115 err("tuner i2c write failed for pll_set.");
116 ret = -EREMOTEIO; 116 ret = -EREMOTEIO;
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c
index 6dbe9dfb03c6..97d74da0dad8 100644
--- a/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/drivers/media/dvb/dvb-usb/umt-010.c
@@ -67,7 +67,7 @@ static int umt_tuner_attach (struct dvb_usb_device *d)
67{ 67{
68 d->pll_addr = 0x61; 68 d->pll_addr = 0x61;
69 d->pll_desc = &dvb_pll_tua6034; 69 d->pll_desc = &dvb_pll_tua6034;
70 d->fe->ops->tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; 70 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
71 return 0; 71 return 0;
72} 72}
73 73
diff --git a/drivers/media/dvb/dvb-usb/vp702x-fe.c b/drivers/media/dvb/dvb-usb/vp702x-fe.c
index 9d26f46de091..d4da494132ec 100644
--- a/drivers/media/dvb/dvb-usb/vp702x-fe.c
+++ b/drivers/media/dvb/dvb-usb/vp702x-fe.c
@@ -287,7 +287,8 @@ struct dvb_frontend * vp702x_fe_attach(struct dvb_usb_device *d)
287 goto error; 287 goto error;
288 288
289 s->d = d; 289 s->d = d;
290 s->fe.ops = &vp702x_fe_ops; 290
291 memcpy(&s->fe.ops,&vp702x_fe_ops,sizeof(struct dvb_frontend_ops));
291 s->fe.demodulator_priv = s; 292 s->fe.demodulator_priv = s;
292 293
293 s->lnb_buf[1] = SET_LNB_POWER; 294 s->lnb_buf[1] = SET_LNB_POWER;
diff --git a/drivers/media/dvb/dvb-usb/vp7045-fe.c b/drivers/media/dvb/dvb-usb/vp7045-fe.c
index e98e5a517f5a..8452eef90322 100644
--- a/drivers/media/dvb/dvb-usb/vp7045-fe.c
+++ b/drivers/media/dvb/dvb-usb/vp7045-fe.c
@@ -23,8 +23,6 @@
23 23
24struct vp7045_fe_state { 24struct vp7045_fe_state {
25 struct dvb_frontend fe; 25 struct dvb_frontend fe;
26 struct dvb_frontend_ops ops;
27
28 struct dvb_usb_device *d; 26 struct dvb_usb_device *d;
29}; 27};
30 28
@@ -151,8 +149,7 @@ struct dvb_frontend * vp7045_fe_attach(struct dvb_usb_device *d)
151 goto error; 149 goto error;
152 150
153 s->d = d; 151 s->d = d;
154 memcpy(&s->ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops)); 152 memcpy(&s->fe.ops, &vp7045_fe_ops, sizeof(struct dvb_frontend_ops));
155 s->fe.ops = &s->ops;
156 s->fe.demodulator_priv = s; 153 s->fe.demodulator_priv = s;
157 154
158 return &s->fe; 155 return &s->fe;
diff --git a/drivers/media/dvb/frontends/bcm3510.c b/drivers/media/dvb/frontends/bcm3510.c
index 1708a1d4893e..baeb311de893 100644
--- a/drivers/media/dvb/frontends/bcm3510.c
+++ b/drivers/media/dvb/frontends/bcm3510.c
@@ -48,7 +48,6 @@
48struct bcm3510_state { 48struct bcm3510_state {
49 49
50 struct i2c_adapter* i2c; 50 struct i2c_adapter* i2c;
51 struct dvb_frontend_ops ops;
52 const struct bcm3510_config* config; 51 const struct bcm3510_config* config;
53 struct dvb_frontend frontend; 52 struct dvb_frontend frontend;
54 53
@@ -791,10 +790,9 @@ struct dvb_frontend* bcm3510_attach(const struct bcm3510_config *config,
791 790
792 state->config = config; 791 state->config = config;
793 state->i2c = i2c; 792 state->i2c = i2c;
794 memcpy(&state->ops, &bcm3510_ops, sizeof(struct dvb_frontend_ops));
795 793
796 /* create dvb_frontend */ 794 /* create dvb_frontend */
797 state->frontend.ops = &state->ops; 795 memcpy(&state->frontend.ops, &bcm3510_ops, sizeof(struct dvb_frontend_ops));
798 state->frontend.demodulator_priv = state; 796 state->frontend.demodulator_priv = state;
799 797
800 mutex_init(&state->hab_mutex); 798 mutex_init(&state->hab_mutex);
diff --git a/drivers/media/dvb/frontends/bsbe1.h b/drivers/media/dvb/frontends/bsbe1.h
index b2aeddb14e16..d8f65738e5d2 100644
--- a/drivers/media/dvb/frontends/bsbe1.h
+++ b/drivers/media/dvb/frontends/bsbe1.h
@@ -106,8 +106,8 @@ static int alps_bsbe1_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
106 data[2] = 0x80 | ((div & 0x18000) >> 10) | 4; 106 data[2] = 0x80 | ((div & 0x18000) >> 10) | 4;
107 data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4; 107 data[3] = (params->frequency > 1530000) ? 0xE0 : 0xE4;
108 108
109 if (fe->ops->i2c_gate_ctrl) 109 if (fe->ops.i2c_gate_ctrl)
110 fe->ops->i2c_gate_ctrl(fe, 1); 110 fe->ops.i2c_gate_ctrl(fe, 1);
111 ret = i2c_transfer(i2c, &msg, 1); 111 ret = i2c_transfer(i2c, &msg, 1);
112 return (ret != 1) ? -EIO : 0; 112 return (ret != 1) ? -EIO : 0;
113} 113}
diff --git a/drivers/media/dvb/frontends/bsru6.h b/drivers/media/dvb/frontends/bsru6.h
index 5533512b04c6..e231cd84b3a1 100644
--- a/drivers/media/dvb/frontends/bsru6.h
+++ b/drivers/media/dvb/frontends/bsru6.h
@@ -120,8 +120,8 @@ static int alps_bsru6_tuner_set_params(struct dvb_frontend *fe, struct dvb_front
120 if (params->frequency > 1530000) 120 if (params->frequency > 1530000)
121 buf[3] = 0xc0; 121 buf[3] = 0xc0;
122 122
123 if (fe->ops->i2c_gate_ctrl) 123 if (fe->ops.i2c_gate_ctrl)
124 fe->ops->i2c_gate_ctrl(fe, 1); 124 fe->ops.i2c_gate_ctrl(fe, 1);
125 if (i2c_transfer(i2c, &msg, 1) != 1) 125 if (i2c_transfer(i2c, &msg, 1) != 1)
126 return -EIO; 126 return -EIO;
127 return 0; 127 return 0;
diff --git a/drivers/media/dvb/frontends/cx22700.c b/drivers/media/dvb/frontends/cx22700.c
index 02fee904752e..3c7c09a362b2 100644
--- a/drivers/media/dvb/frontends/cx22700.c
+++ b/drivers/media/dvb/frontends/cx22700.c
@@ -34,8 +34,6 @@ struct cx22700_state {
34 34
35 struct i2c_adapter* i2c; 35 struct i2c_adapter* i2c;
36 36
37 struct dvb_frontend_ops ops;
38
39 const struct cx22700_config* config; 37 const struct cx22700_config* config;
40 38
41 struct dvb_frontend frontend; 39 struct dvb_frontend frontend;
@@ -327,9 +325,9 @@ static int cx22700_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
327 cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/ 325 cx22700_writereg (state, 0x00, 0x02); /* XXX CHECKME: soft reset*/
328 cx22700_writereg (state, 0x00, 0x00); 326 cx22700_writereg (state, 0x00, 0x00);
329 327
330 if (fe->ops->tuner_ops.set_params) { 328 if (fe->ops.tuner_ops.set_params) {
331 fe->ops->tuner_ops.set_params(fe, p); 329 fe->ops.tuner_ops.set_params(fe, p);
332 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 330 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
333 } 331 }
334 332
335 cx22700_set_inversion (state, p->inversion); 333 cx22700_set_inversion (state, p->inversion);
@@ -388,13 +386,12 @@ struct dvb_frontend* cx22700_attach(const struct cx22700_config* config,
388 /* setup the state */ 386 /* setup the state */
389 state->config = config; 387 state->config = config;
390 state->i2c = i2c; 388 state->i2c = i2c;
391 memcpy(&state->ops, &cx22700_ops, sizeof(struct dvb_frontend_ops));
392 389
393 /* check if the demod is there */ 390 /* check if the demod is there */
394 if (cx22700_readreg(state, 0x07) < 0) goto error; 391 if (cx22700_readreg(state, 0x07) < 0) goto error;
395 392
396 /* create dvb_frontend */ 393 /* create dvb_frontend */
397 state->frontend.ops = &state->ops; 394 memcpy(&state->frontend.ops, &cx22700_ops, sizeof(struct dvb_frontend_ops));
398 state->frontend.demodulator_priv = state; 395 state->frontend.demodulator_priv = state;
399 return &state->frontend; 396 return &state->frontend;
400 397
diff --git a/drivers/media/dvb/frontends/cx22702.c b/drivers/media/dvb/frontends/cx22702.c
index a129fc9cba30..4106d46c957f 100644
--- a/drivers/media/dvb/frontends/cx22702.c
+++ b/drivers/media/dvb/frontends/cx22702.c
@@ -40,8 +40,6 @@ struct cx22702_state {
40 40
41 struct i2c_adapter* i2c; 41 struct i2c_adapter* i2c;
42 42
43 struct dvb_frontend_ops ops;
44
45 /* configuration settings */ 43 /* configuration settings */
46 const struct cx22702_config* config; 44 const struct cx22702_config* config;
47 45
@@ -211,9 +209,9 @@ static int cx22702_set_tps (struct dvb_frontend* fe, struct dvb_frontend_paramet
211 u8 val; 209 u8 val;
212 struct cx22702_state* state = fe->demodulator_priv; 210 struct cx22702_state* state = fe->demodulator_priv;
213 211
214 if (fe->ops->tuner_ops.set_params) { 212 if (fe->ops.tuner_ops.set_params) {
215 fe->ops->tuner_ops.set_params(fe, p); 213 fe->ops.tuner_ops.set_params(fe, p);
216 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 214 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
217 } 215 }
218 216
219 /* set inversion */ 217 /* set inversion */
@@ -479,7 +477,6 @@ struct dvb_frontend* cx22702_attach(const struct cx22702_config* config,
479 /* setup the state */ 477 /* setup the state */
480 state->config = config; 478 state->config = config;
481 state->i2c = i2c; 479 state->i2c = i2c;
482 memcpy(&state->ops, &cx22702_ops, sizeof(struct dvb_frontend_ops));
483 state->prevUCBlocks = 0; 480 state->prevUCBlocks = 0;
484 481
485 /* check if the demod is there */ 482 /* check if the demod is there */
@@ -487,7 +484,7 @@ struct dvb_frontend* cx22702_attach(const struct cx22702_config* config,
487 goto error; 484 goto error;
488 485
489 /* create dvb_frontend */ 486 /* create dvb_frontend */
490 state->frontend.ops = &state->ops; 487 memcpy(&state->frontend.ops, &cx22702_ops, sizeof(struct dvb_frontend_ops));
491 state->frontend.demodulator_priv = state; 488 state->frontend.demodulator_priv = state;
492 return &state->frontend; 489 return &state->frontend;
493 490
diff --git a/drivers/media/dvb/frontends/cx24110.c b/drivers/media/dvb/frontends/cx24110.c
index 8d98ffb61e4e..ce3c7398bac9 100644
--- a/drivers/media/dvb/frontends/cx24110.c
+++ b/drivers/media/dvb/frontends/cx24110.c
@@ -36,8 +36,6 @@ struct cx24110_state {
36 36
37 struct i2c_adapter* i2c; 37 struct i2c_adapter* i2c;
38 38
39 struct dvb_frontend_ops ops;
40
41 const struct cx24110_config* config; 39 const struct cx24110_config* config;
42 40
43 struct dvb_frontend frontend; 41 struct dvb_frontend frontend;
@@ -538,9 +536,9 @@ static int cx24110_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
538 struct cx24110_state *state = fe->demodulator_priv; 536 struct cx24110_state *state = fe->demodulator_priv;
539 537
540 538
541 if (fe->ops->tuner_ops.set_params) { 539 if (fe->ops.tuner_ops.set_params) {
542 fe->ops->tuner_ops.set_params(fe, p); 540 fe->ops.tuner_ops.set_params(fe, p);
543 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 541 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
544 } 542 }
545 543
546 cx24110_set_inversion (state, p->inversion); 544 cx24110_set_inversion (state, p->inversion);
@@ -606,7 +604,6 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
606 /* setup the state */ 604 /* setup the state */
607 state->config = config; 605 state->config = config;
608 state->i2c = i2c; 606 state->i2c = i2c;
609 memcpy(&state->ops, &cx24110_ops, sizeof(struct dvb_frontend_ops));
610 state->lastber = 0; 607 state->lastber = 0;
611 state->lastbler = 0; 608 state->lastbler = 0;
612 state->lastesn0 = 0; 609 state->lastesn0 = 0;
@@ -616,7 +613,7 @@ struct dvb_frontend* cx24110_attach(const struct cx24110_config* config,
616 if ((ret != 0x5a) && (ret != 0x69)) goto error; 613 if ((ret != 0x5a) && (ret != 0x69)) goto error;
617 614
618 /* create dvb_frontend */ 615 /* create dvb_frontend */
619 state->frontend.ops = &state->ops; 616 memcpy(&state->frontend.ops, &cx24110_ops, sizeof(struct dvb_frontend_ops));
620 state->frontend.demodulator_priv = state; 617 state->frontend.demodulator_priv = state;
621 return &state->frontend; 618 return &state->frontend;
622 619
diff --git a/drivers/media/dvb/frontends/cx24123.c b/drivers/media/dvb/frontends/cx24123.c
index c71422964064..f2f795cba56a 100644
--- a/drivers/media/dvb/frontends/cx24123.c
+++ b/drivers/media/dvb/frontends/cx24123.c
@@ -41,7 +41,6 @@ static int debug;
41struct cx24123_state 41struct cx24123_state
42{ 42{
43 struct i2c_adapter* i2c; 43 struct i2c_adapter* i2c;
44 struct dvb_frontend_ops ops;
45 const struct cx24123_config* config; 44 const struct cx24123_config* config;
46 45
47 struct dvb_frontend frontend; 46 struct dvb_frontend frontend;
@@ -429,8 +428,8 @@ static int cx24123_set_symbolrate(struct cx24123_state* state, u32 srate)
429 u8 pll_mult; 428 u8 pll_mult;
430 429
431 /* check if symbol rate is within limits */ 430 /* check if symbol rate is within limits */
432 if ((srate > state->ops.info.symbol_rate_max) || 431 if ((srate > state->frontend.ops.info.symbol_rate_max) ||
433 (srate < state->ops.info.symbol_rate_min)) 432 (srate < state->frontend.ops.info.symbol_rate_min))
434 return -EOPNOTSUPP;; 433 return -EOPNOTSUPP;;
435 434
436 /* choose the sampling rate high enough for the required operation, 435 /* choose the sampling rate high enough for the required operation,
@@ -950,7 +949,6 @@ struct dvb_frontend* cx24123_attach(const struct cx24123_config* config,
950 /* setup the state */ 949 /* setup the state */
951 state->config = config; 950 state->config = config;
952 state->i2c = i2c; 951 state->i2c = i2c;
953 memcpy(&state->ops, &cx24123_ops, sizeof(struct dvb_frontend_ops));
954 state->lastber = 0; 952 state->lastber = 0;
955 state->snr = 0; 953 state->snr = 0;
956 state->VCAarg = 0; 954 state->VCAarg = 0;
@@ -968,7 +966,7 @@ struct dvb_frontend* cx24123_attach(const struct cx24123_config* config,
968 } 966 }
969 967
970 /* create dvb_frontend */ 968 /* create dvb_frontend */
971 state->frontend.ops = &state->ops; 969 memcpy(&state->frontend.ops, &cx24123_ops, sizeof(struct dvb_frontend_ops));
972 state->frontend.demodulator_priv = state; 970 state->frontend.demodulator_priv = state;
973 return &state->frontend; 971 return &state->frontend;
974 972
diff --git a/drivers/media/dvb/frontends/dib3000-common.h b/drivers/media/dvb/frontends/dib3000-common.h
index c31d6df15472..be1c0d3e1389 100644
--- a/drivers/media/dvb/frontends/dib3000-common.h
+++ b/drivers/media/dvb/frontends/dib3000-common.h
@@ -38,8 +38,6 @@
38struct dib3000_state { 38struct dib3000_state {
39 struct i2c_adapter* i2c; 39 struct i2c_adapter* i2c;
40 40
41 struct dvb_frontend_ops ops;
42
43/* configuration settings */ 41/* configuration settings */
44 struct dib3000_config config; 42 struct dib3000_config config;
45 43
diff --git a/drivers/media/dvb/frontends/dib3000mb.c b/drivers/media/dvb/frontends/dib3000mb.c
index f2f8071ad1b0..7c6dc7e30900 100644
--- a/drivers/media/dvb/frontends/dib3000mb.c
+++ b/drivers/media/dvb/frontends/dib3000mb.c
@@ -60,9 +60,9 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe,
60 fe_code_rate_t fe_cr = FEC_NONE; 60 fe_code_rate_t fe_cr = FEC_NONE;
61 int search_state, seq; 61 int search_state, seq;
62 62
63 if (tuner && fe->ops->tuner_ops.set_params) { 63 if (tuner && fe->ops.tuner_ops.set_params) {
64 fe->ops->tuner_ops.set_params(fe, fep); 64 fe->ops.tuner_ops.set_params(fe, fep);
65 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 65 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
66 66
67 deb_setf("bandwidth: "); 67 deb_setf("bandwidth: ");
68 switch (ofdm->bandwidth) { 68 switch (ofdm->bandwidth) {
@@ -705,7 +705,6 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
705 /* setup the state */ 705 /* setup the state */
706 state->i2c = i2c; 706 state->i2c = i2c;
707 memcpy(&state->config,config,sizeof(struct dib3000_config)); 707 memcpy(&state->config,config,sizeof(struct dib3000_config));
708 memcpy(&state->ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops));
709 708
710 /* check for the correct demod */ 709 /* check for the correct demod */
711 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) 710 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM)
@@ -715,7 +714,7 @@ struct dvb_frontend* dib3000mb_attach(const struct dib3000_config* config,
715 goto error; 714 goto error;
716 715
717 /* create dvb_frontend */ 716 /* create dvb_frontend */
718 state->frontend.ops = &state->ops; 717 memcpy(&state->frontend.ops, &dib3000mb_ops, sizeof(struct dvb_frontend_ops));
719 state->frontend.demodulator_priv = state; 718 state->frontend.demodulator_priv = state;
720 719
721 /* set the xfer operations */ 720 /* set the xfer operations */
diff --git a/drivers/media/dvb/frontends/dib3000mc.c b/drivers/media/dvb/frontends/dib3000mc.c
index 68a443b3d504..6c3be2529980 100644
--- a/drivers/media/dvb/frontends/dib3000mc.c
+++ b/drivers/media/dvb/frontends/dib3000mc.c
@@ -462,9 +462,9 @@ static int dib3000mc_set_frontend(struct dvb_frontend* fe,
462 int search_state,auto_val; 462 int search_state,auto_val;
463 u16 val; 463 u16 val;
464 464
465 if (tuner && fe->ops->tuner_ops.set_params) { /* initial call from dvb */ 465 if (tuner && fe->ops.tuner_ops.set_params) { /* initial call from dvb */
466 fe->ops->tuner_ops.set_params(fe, fep); 466 fe->ops.tuner_ops.set_params(fe, fep);
467 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 467 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
468 468
469 state->last_tuned_freq = fep->frequency; 469 state->last_tuned_freq = fep->frequency;
470 // if (!scanboost) { 470 // if (!scanboost) {
@@ -837,7 +837,6 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config,
837 /* setup the state */ 837 /* setup the state */
838 state->i2c = i2c; 838 state->i2c = i2c;
839 memcpy(&state->config,config,sizeof(struct dib3000_config)); 839 memcpy(&state->config,config,sizeof(struct dib3000_config));
840 memcpy(&state->ops, &dib3000mc_ops, sizeof(struct dvb_frontend_ops));
841 840
842 /* check for the correct demod */ 841 /* check for the correct demod */
843 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM) 842 if (rd(DIB3000_REG_MANUFACTOR_ID) != DIB3000_I2C_ID_DIBCOM)
@@ -857,7 +856,7 @@ struct dvb_frontend* dib3000mc_attach(const struct dib3000_config* config,
857 } 856 }
858 857
859 /* create dvb_frontend */ 858 /* create dvb_frontend */
860 state->frontend.ops = &state->ops; 859 memcpy(&state->frontend.ops, &dib3000mc_ops, sizeof(struct dvb_frontend_ops));
861 state->frontend.demodulator_priv = state; 860 state->frontend.demodulator_priv = state;
862 861
863 /* set the xfer operations */ 862 /* set the xfer operations */
@@ -874,6 +873,7 @@ error:
874 kfree(state); 873 kfree(state);
875 return NULL; 874 return NULL;
876} 875}
876EXPORT_SYMBOL(dib3000mc_attach);
877 877
878static struct dvb_frontend_ops dib3000mc_ops = { 878static struct dvb_frontend_ops dib3000mc_ops = {
879 879
@@ -912,5 +912,3 @@ static struct dvb_frontend_ops dib3000mc_ops = {
912MODULE_AUTHOR(DRIVER_AUTHOR); 912MODULE_AUTHOR(DRIVER_AUTHOR);
913MODULE_DESCRIPTION(DRIVER_DESC); 913MODULE_DESCRIPTION(DRIVER_DESC);
914MODULE_LICENSE("GPL"); 914MODULE_LICENSE("GPL");
915
916EXPORT_SYMBOL(dib3000mc_attach);
diff --git a/drivers/media/dvb/frontends/dvb-pll.c b/drivers/media/dvb/frontends/dvb-pll.c
index a1a4be41e03e..a189683454b7 100644
--- a/drivers/media/dvb/frontends/dvb-pll.c
+++ b/drivers/media/dvb/frontends/dvb-pll.c
@@ -505,8 +505,8 @@ static int dvb_pll_sleep(struct dvb_frontend *fe)
505 buf[2] = priv->pll_desc->entries[i].config; 505 buf[2] = priv->pll_desc->entries[i].config;
506 buf[3] = priv->pll_desc->entries[i].cb; 506 buf[3] = priv->pll_desc->entries[i].cb;
507 507
508 if (fe->ops->i2c_gate_ctrl) 508 if (fe->ops.i2c_gate_ctrl)
509 fe->ops->i2c_gate_ctrl(fe, 1); 509 fe->ops.i2c_gate_ctrl(fe, 1);
510 if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) { 510 if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) {
511 return result; 511 return result;
512 } 512 }
@@ -529,15 +529,15 @@ static int dvb_pll_set_params(struct dvb_frontend *fe, struct dvb_frontend_param
529 return -EINVAL; 529 return -EINVAL;
530 530
531 // DVBT bandwidth only just now 531 // DVBT bandwidth only just now
532 if (fe->ops->info.type == FE_OFDM) { 532 if (fe->ops.info.type == FE_OFDM) {
533 bandwidth = params->u.ofdm.bandwidth; 533 bandwidth = params->u.ofdm.bandwidth;
534 } 534 }
535 535
536 if ((result = dvb_pll_configure(priv->pll_desc, buf, params->frequency, bandwidth)) != 0) 536 if ((result = dvb_pll_configure(priv->pll_desc, buf, params->frequency, bandwidth)) != 0)
537 return result; 537 return result;
538 538
539 if (fe->ops->i2c_gate_ctrl) 539 if (fe->ops.i2c_gate_ctrl)
540 fe->ops->i2c_gate_ctrl(fe, 1); 540 fe->ops.i2c_gate_ctrl(fe, 1);
541 if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) { 541 if ((result = i2c_transfer(priv->i2c, &msg, 1)) != 1) {
542 return result; 542 return result;
543 } 543 }
@@ -567,7 +567,7 @@ static int dvb_pll_calc_regs(struct dvb_frontend *fe, struct dvb_frontend_parame
567 return -EINVAL; 567 return -EINVAL;
568 568
569 // DVBT bandwidth only just now 569 // DVBT bandwidth only just now
570 if (fe->ops->info.type == FE_OFDM) { 570 if (fe->ops.info.type == FE_OFDM) {
571 bandwidth = params->u.ofdm.bandwidth; 571 bandwidth = params->u.ofdm.bandwidth;
572 } 572 }
573 573
@@ -623,10 +623,10 @@ int dvb_pll_attach(struct dvb_frontend *fe, int pll_addr, struct i2c_adapter *i2
623 priv->i2c = i2c; 623 priv->i2c = i2c;
624 priv->pll_desc = desc; 624 priv->pll_desc = desc;
625 625
626 memcpy(&fe->ops->tuner_ops, &dvb_pll_tuner_ops, sizeof(struct dvb_tuner_ops)); 626 memcpy(&fe->ops.tuner_ops, &dvb_pll_tuner_ops, sizeof(struct dvb_tuner_ops));
627 strncpy(fe->ops->tuner_ops.info.name, desc->name, 128); 627 strncpy(fe->ops.tuner_ops.info.name, desc->name, 128);
628 fe->ops->tuner_ops.info.frequency_min = desc->min; 628 fe->ops.tuner_ops.info.frequency_min = desc->min;
629 fe->ops->tuner_ops.info.frequency_min = desc->max; 629 fe->ops.tuner_ops.info.frequency_min = desc->max;
630 630
631 fe->tuner_priv = priv; 631 fe->tuner_priv = priv;
632 return 0; 632 return 0;
diff --git a/drivers/media/dvb/frontends/dvb_dummy_fe.c b/drivers/media/dvb/frontends/dvb_dummy_fe.c
index 78ea4ff03e68..6271b1e7f6ab 100644
--- a/drivers/media/dvb/frontends/dvb_dummy_fe.c
+++ b/drivers/media/dvb/frontends/dvb_dummy_fe.c
@@ -30,7 +30,6 @@
30 30
31 31
32struct dvb_dummy_fe_state { 32struct dvb_dummy_fe_state {
33 struct dvb_frontend_ops ops;
34 struct dvb_frontend frontend; 33 struct dvb_frontend frontend;
35}; 34};
36 35
@@ -121,11 +120,8 @@ struct dvb_frontend* dvb_dummy_fe_ofdm_attach(void)
121 state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); 120 state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL);
122 if (state == NULL) goto error; 121 if (state == NULL) goto error;
123 122
124 /* setup the state */
125 memcpy(&state->ops, &dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops));
126
127 /* create dvb_frontend */ 123 /* create dvb_frontend */
128 state->frontend.ops = &state->ops; 124 memcpy(&state->frontend.ops, &dvb_dummy_fe_ofdm_ops, sizeof(struct dvb_frontend_ops));
129 state->frontend.demodulator_priv = state; 125 state->frontend.demodulator_priv = state;
130 return &state->frontend; 126 return &state->frontend;
131 127
@@ -144,11 +140,8 @@ struct dvb_frontend* dvb_dummy_fe_qpsk_attach()
144 state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); 140 state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL);
145 if (state == NULL) goto error; 141 if (state == NULL) goto error;
146 142
147 /* setup the state */
148 memcpy(&state->ops, &dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops));
149
150 /* create dvb_frontend */ 143 /* create dvb_frontend */
151 state->frontend.ops = &state->ops; 144 memcpy(&state->frontend.ops, &dvb_dummy_fe_qpsk_ops, sizeof(struct dvb_frontend_ops));
152 state->frontend.demodulator_priv = state; 145 state->frontend.demodulator_priv = state;
153 return &state->frontend; 146 return &state->frontend;
154 147
@@ -167,11 +160,8 @@ struct dvb_frontend* dvb_dummy_fe_qam_attach()
167 state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL); 160 state = kmalloc(sizeof(struct dvb_dummy_fe_state), GFP_KERNEL);
168 if (state == NULL) goto error; 161 if (state == NULL) goto error;
169 162
170 /* setup the state */
171 memcpy(&state->ops, &dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops));
172
173 /* create dvb_frontend */ 163 /* create dvb_frontend */
174 state->frontend.ops = &state->ops; 164 memcpy(&state->frontend.ops, &dvb_dummy_fe_qam_ops, sizeof(struct dvb_frontend_ops));
175 state->frontend.demodulator_priv = state; 165 state->frontend.demodulator_priv = state;
176 return &state->frontend; 166 return &state->frontend;
177 167
diff --git a/drivers/media/dvb/frontends/isl6421.c b/drivers/media/dvb/frontends/isl6421.c
index 36992077aaf0..58c34db31071 100644
--- a/drivers/media/dvb/frontends/isl6421.c
+++ b/drivers/media/dvb/frontends/isl6421.c
@@ -99,11 +99,11 @@ static void isl6421_release(struct dvb_frontend *fe)
99 isl6421_set_voltage(fe, SEC_VOLTAGE_OFF); 99 isl6421_set_voltage(fe, SEC_VOLTAGE_OFF);
100 100
101 /* free data & call next release routine */ 101 /* free data & call next release routine */
102 fe->ops->release = isl6421->release_chain; 102 fe->ops.release = isl6421->release_chain;
103 kfree(fe->misc_priv); 103 kfree(fe->misc_priv);
104 fe->misc_priv = NULL; 104 fe->misc_priv = NULL;
105 if (fe->ops->release) 105 if (fe->ops.release)
106 fe->ops->release(fe); 106 fe->ops.release(fe);
107} 107}
108 108
109int isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr, 109int isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr,
@@ -133,12 +133,12 @@ int isl6421_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 i2c_addr
133 } 133 }
134 134
135 /* install release callback */ 135 /* install release callback */
136 isl6421->release_chain = fe->ops->release; 136 isl6421->release_chain = fe->ops.release;
137 fe->ops->release = isl6421_release; 137 fe->ops.release = isl6421_release;
138 138
139 /* override frontend ops */ 139 /* override frontend ops */
140 fe->ops->set_voltage = isl6421_set_voltage; 140 fe->ops.set_voltage = isl6421_set_voltage;
141 fe->ops->enable_high_lnb_voltage = isl6421_enable_high_lnb_voltage; 141 fe->ops.enable_high_lnb_voltage = isl6421_enable_high_lnb_voltage;
142 142
143 return 0; 143 return 0;
144} 144}
diff --git a/drivers/media/dvb/frontends/l64781.c b/drivers/media/dvb/frontends/l64781.c
index fa4a87e0049e..f3bc82e44a28 100644
--- a/drivers/media/dvb/frontends/l64781.c
+++ b/drivers/media/dvb/frontends/l64781.c
@@ -32,7 +32,6 @@
32 32
33struct l64781_state { 33struct l64781_state {
34 struct i2c_adapter* i2c; 34 struct i2c_adapter* i2c;
35 struct dvb_frontend_ops ops;
36 const struct l64781_config* config; 35 const struct l64781_config* config;
37 struct dvb_frontend frontend; 36 struct dvb_frontend frontend;
38 37
@@ -141,9 +140,9 @@ static int apply_frontend_param (struct dvb_frontend* fe, struct dvb_frontend_pa
141 u8 val0x06; 140 u8 val0x06;
142 int bw = p->bandwidth - BANDWIDTH_8_MHZ; 141 int bw = p->bandwidth - BANDWIDTH_8_MHZ;
143 142
144 if (fe->ops->tuner_ops.set_params) { 143 if (fe->ops.tuner_ops.set_params) {
145 fe->ops->tuner_ops.set_params(fe, param); 144 fe->ops.tuner_ops.set_params(fe, param);
146 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 145 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
147 } 146 }
148 147
149 if (param->inversion != INVERSION_ON && 148 if (param->inversion != INVERSION_ON &&
@@ -509,7 +508,6 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
509 /* setup the state */ 508 /* setup the state */
510 state->config = config; 509 state->config = config;
511 state->i2c = i2c; 510 state->i2c = i2c;
512 memcpy(&state->ops, &l64781_ops, sizeof(struct dvb_frontend_ops));
513 state->first = 1; 511 state->first = 1;
514 512
515 /** 513 /**
@@ -555,7 +553,7 @@ struct dvb_frontend* l64781_attach(const struct l64781_config* config,
555 } 553 }
556 554
557 /* create dvb_frontend */ 555 /* create dvb_frontend */
558 state->frontend.ops = &state->ops; 556 memcpy(&state->frontend.ops, &l64781_ops, sizeof(struct dvb_frontend_ops));
559 state->frontend.demodulator_priv = state; 557 state->frontend.demodulator_priv = state;
560 return &state->frontend; 558 return &state->frontend;
561 559
diff --git a/drivers/media/dvb/frontends/lg_h06xf.h b/drivers/media/dvb/frontends/lg_h06xf.h
index c59fe4180522..754d51d11120 100644
--- a/drivers/media/dvb/frontends/lg_h06xf.h
+++ b/drivers/media/dvb/frontends/lg_h06xf.h
@@ -29,8 +29,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada
29 int err; 29 int err;
30 30
31 dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0); 31 dvb_pll_configure(&dvb_pll_lg_tdvs_h06xf, buf, params->frequency, 0);
32 if (fe->ops->i2c_gate_ctrl) 32 if (fe->ops.i2c_gate_ctrl)
33 fe->ops->i2c_gate_ctrl(fe, 1); 33 fe->ops.i2c_gate_ctrl(fe, 1);
34 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { 34 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) {
35 printk(KERN_WARNING "lg_h06xf: %s error " 35 printk(KERN_WARNING "lg_h06xf: %s error "
36 "(addr %02x <- %02x, err = %i)\n", 36 "(addr %02x <- %02x, err = %i)\n",
@@ -47,8 +47,8 @@ static int lg_h06xf_pll_set(struct dvb_frontend* fe, struct i2c_adapter* i2c_ada
47 buf[0] |= 0x18; 47 buf[0] |= 0x18;
48 buf[1] = 0x50; 48 buf[1] = 0x50;
49 msg.len = 2; 49 msg.len = 2;
50 if (fe->ops->i2c_gate_ctrl) 50 if (fe->ops.i2c_gate_ctrl)
51 fe->ops->i2c_gate_ctrl(fe, 1); 51 fe->ops.i2c_gate_ctrl(fe, 1);
52 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) { 52 if ((err = i2c_transfer(i2c_adap, &msg, 1)) != 1) {
53 printk(KERN_WARNING "lg_h06xf: %s error " 53 printk(KERN_WARNING "lg_h06xf: %s error "
54 "(addr %02x <- %02x, err = %i)\n", 54 "(addr %02x <- %02x, err = %i)\n",
diff --git a/drivers/media/dvb/frontends/lgdt330x.c b/drivers/media/dvb/frontends/lgdt330x.c
index 5deb6445aca5..53bafc7c9f9b 100644
--- a/drivers/media/dvb/frontends/lgdt330x.c
+++ b/drivers/media/dvb/frontends/lgdt330x.c
@@ -60,7 +60,6 @@ if (debug) printk(KERN_DEBUG "lgdt330x: " args); \
60struct lgdt330x_state 60struct lgdt330x_state
61{ 61{
62 struct i2c_adapter* i2c; 62 struct i2c_adapter* i2c;
63 struct dvb_frontend_ops ops;
64 63
65 /* Configuration settings */ 64 /* Configuration settings */
66 const struct lgdt330x_config* config; 65 const struct lgdt330x_config* config;
@@ -400,9 +399,9 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe,
400 } 399 }
401 400
402 /* Tune to the specified frequency */ 401 /* Tune to the specified frequency */
403 if (fe->ops->tuner_ops.set_params) { 402 if (fe->ops.tuner_ops.set_params) {
404 fe->ops->tuner_ops.set_params(fe, param); 403 fe->ops.tuner_ops.set_params(fe, param);
405 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 404 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
406 } 405 }
407 406
408 /* Keep track of the new frequency */ 407 /* Keep track of the new frequency */
@@ -724,16 +723,19 @@ struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config,
724 /* Setup the state */ 723 /* Setup the state */
725 state->config = config; 724 state->config = config;
726 state->i2c = i2c; 725 state->i2c = i2c;
726
727 /* Create dvb_frontend */
727 switch (config->demod_chip) { 728 switch (config->demod_chip) {
728 case LGDT3302: 729 case LGDT3302:
729 memcpy(&state->ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops)); 730 memcpy(&state->frontend.ops, &lgdt3302_ops, sizeof(struct dvb_frontend_ops));
730 break; 731 break;
731 case LGDT3303: 732 case LGDT3303:
732 memcpy(&state->ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops)); 733 memcpy(&state->frontend.ops, &lgdt3303_ops, sizeof(struct dvb_frontend_ops));
733 break; 734 break;
734 default: 735 default:
735 goto error; 736 goto error;
736 } 737 }
738 state->frontend.demodulator_priv = state;
737 739
738 /* Verify communication with demod chip */ 740 /* Verify communication with demod chip */
739 if (i2c_read_demod_bytes(state, 2, buf, 1)) 741 if (i2c_read_demod_bytes(state, 2, buf, 1))
@@ -742,9 +744,6 @@ struct dvb_frontend* lgdt330x_attach(const struct lgdt330x_config* config,
742 state->current_frequency = -1; 744 state->current_frequency = -1;
743 state->current_modulation = -1; 745 state->current_modulation = -1;
744 746
745 /* Create dvb_frontend */
746 state->frontend.ops = &state->ops;
747 state->frontend.demodulator_priv = state;
748 return &state->frontend; 747 return &state->frontend;
749 748
750error: 749error:
diff --git a/drivers/media/dvb/frontends/lnbp21.c b/drivers/media/dvb/frontends/lnbp21.c
index c9152c1fbc3f..e933edc8dd29 100644
--- a/drivers/media/dvb/frontends/lnbp21.c
+++ b/drivers/media/dvb/frontends/lnbp21.c
@@ -97,11 +97,11 @@ static void lnbp21_release(struct dvb_frontend *fe)
97 lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF); 97 lnbp21_set_voltage(fe, SEC_VOLTAGE_OFF);
98 98
99 /* free data & call next release routine */ 99 /* free data & call next release routine */
100 fe->ops->release = lnbp21->release_chain; 100 fe->ops.release = lnbp21->release_chain;
101 kfree(fe->misc_priv); 101 kfree(fe->misc_priv);
102 fe->misc_priv = NULL; 102 fe->misc_priv = NULL;
103 if (fe->ops->release) 103 if (fe->ops.release)
104 fe->ops->release(fe); 104 fe->ops.release(fe);
105} 105}
106 106
107int lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set, u8 override_clear) 107int lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_set, u8 override_clear)
@@ -129,12 +129,12 @@ int lnbp21_attach(struct dvb_frontend *fe, struct i2c_adapter *i2c, u8 override_
129 } 129 }
130 130
131 /* install release callback */ 131 /* install release callback */
132 lnbp21->release_chain = fe->ops->release; 132 lnbp21->release_chain = fe->ops.release;
133 fe->ops->release = lnbp21_release; 133 fe->ops.release = lnbp21_release;
134 134
135 /* override frontend ops */ 135 /* override frontend ops */
136 fe->ops->set_voltage = lnbp21_set_voltage; 136 fe->ops.set_voltage = lnbp21_set_voltage;
137 fe->ops->enable_high_lnb_voltage = lnbp21_enable_high_lnb_voltage; 137 fe->ops.enable_high_lnb_voltage = lnbp21_enable_high_lnb_voltage;
138 138
139 return 0; 139 return 0;
140} 140}
diff --git a/drivers/media/dvb/frontends/mt312.c b/drivers/media/dvb/frontends/mt312.c
index 46e12a8acf72..1ef821825641 100644
--- a/drivers/media/dvb/frontends/mt312.c
+++ b/drivers/media/dvb/frontends/mt312.c
@@ -39,7 +39,6 @@
39 39
40struct mt312_state { 40struct mt312_state {
41 struct i2c_adapter* i2c; 41 struct i2c_adapter* i2c;
42 struct dvb_frontend_ops ops;
43 /* configuration settings */ 42 /* configuration settings */
44 const struct mt312_config* config; 43 const struct mt312_config* config;
45 struct dvb_frontend frontend; 44 struct dvb_frontend frontend;
@@ -471,16 +470,16 @@ static int mt312_set_frontend(struct dvb_frontend* fe,
471 470
472 dprintk("%s: Freq %d\n", __FUNCTION__, p->frequency); 471 dprintk("%s: Freq %d\n", __FUNCTION__, p->frequency);
473 472
474 if ((p->frequency < fe->ops->info.frequency_min) 473 if ((p->frequency < fe->ops.info.frequency_min)
475 || (p->frequency > fe->ops->info.frequency_max)) 474 || (p->frequency > fe->ops.info.frequency_max))
476 return -EINVAL; 475 return -EINVAL;
477 476
478 if ((p->inversion < INVERSION_OFF) 477 if ((p->inversion < INVERSION_OFF)
479 || (p->inversion > INVERSION_ON)) 478 || (p->inversion > INVERSION_ON))
480 return -EINVAL; 479 return -EINVAL;
481 480
482 if ((p->u.qpsk.symbol_rate < fe->ops->info.symbol_rate_min) 481 if ((p->u.qpsk.symbol_rate < fe->ops.info.symbol_rate_min)
483 || (p->u.qpsk.symbol_rate > fe->ops->info.symbol_rate_max)) 482 || (p->u.qpsk.symbol_rate > fe->ops.info.symbol_rate_max))
484 return -EINVAL; 483 return -EINVAL;
485 484
486 if ((p->u.qpsk.fec_inner < FEC_NONE) 485 if ((p->u.qpsk.fec_inner < FEC_NONE)
@@ -523,9 +522,9 @@ static int mt312_set_frontend(struct dvb_frontend* fe,
523 return -EINVAL; 522 return -EINVAL;
524 } 523 }
525 524
526 if (fe->ops->tuner_ops.set_params) { 525 if (fe->ops.tuner_ops.set_params) {
527 fe->ops->tuner_ops.set_params(fe, p); 526 fe->ops.tuner_ops.set_params(fe, p);
528 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 527 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
529 } 528 }
530 529
531 /* sr = (u16)(sr * 256.0 / 1000000.0) */ 530 /* sr = (u16)(sr * 256.0 / 1000000.0) */
@@ -670,19 +669,22 @@ struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config,
670 /* setup the state */ 669 /* setup the state */
671 state->config = config; 670 state->config = config;
672 state->i2c = i2c; 671 state->i2c = i2c;
673 memcpy(&state->ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
674 672
675 /* check if the demod is there */ 673 /* check if the demod is there */
676 if (mt312_readreg(state, ID, &state->id) < 0) 674 if (mt312_readreg(state, ID, &state->id) < 0)
677 goto error; 675 goto error;
678 676
677 /* create dvb_frontend */
678 memcpy(&state->frontend.ops, &vp310_mt312_ops, sizeof(struct dvb_frontend_ops));
679 state->frontend.demodulator_priv = state;
680
679 switch (state->id) { 681 switch (state->id) {
680 case ID_VP310: 682 case ID_VP310:
681 strcpy(state->ops.info.name, "Zarlink VP310 DVB-S"); 683 strcpy(state->frontend.ops.info.name, "Zarlink VP310 DVB-S");
682 state->frequency = 90; 684 state->frequency = 90;
683 break; 685 break;
684 case ID_MT312: 686 case ID_MT312:
685 strcpy(state->ops.info.name, "Zarlink MT312 DVB-S"); 687 strcpy(state->frontend.ops.info.name, "Zarlink MT312 DVB-S");
686 state->frequency = 60; 688 state->frequency = 60;
687 break; 689 break;
688 default: 690 default:
@@ -690,9 +692,6 @@ struct dvb_frontend* vp310_mt312_attach(const struct mt312_config* config,
690 goto error; 692 goto error;
691 } 693 }
692 694
693 /* create dvb_frontend */
694 state->frontend.ops = &state->ops;
695 state->frontend.demodulator_priv = state;
696 return &state->frontend; 695 return &state->frontend;
697 696
698error: 697error:
diff --git a/drivers/media/dvb/frontends/mt352.c b/drivers/media/dvb/frontends/mt352.c
index 8601a3f43074..5de7376c94ce 100644
--- a/drivers/media/dvb/frontends/mt352.c
+++ b/drivers/media/dvb/frontends/mt352.c
@@ -45,7 +45,6 @@
45struct mt352_state { 45struct mt352_state {
46 struct i2c_adapter* i2c; 46 struct i2c_adapter* i2c;
47 struct dvb_frontend frontend; 47 struct dvb_frontend frontend;
48 struct dvb_frontend_ops ops;
49 48
50 /* configuration settings */ 49 /* configuration settings */
51 struct mt352_config config; 50 struct mt352_config config;
@@ -288,17 +287,17 @@ static int mt352_set_parameters(struct dvb_frontend* fe,
288 mt352_calc_input_freq(state, buf+6); 287 mt352_calc_input_freq(state, buf+6);
289 288
290 if (state->config.no_tuner) { 289 if (state->config.no_tuner) {
291 if (fe->ops->tuner_ops.set_params) { 290 if (fe->ops.tuner_ops.set_params) {
292 fe->ops->tuner_ops.set_params(fe, param); 291 fe->ops.tuner_ops.set_params(fe, param);
293 if (fe->ops->i2c_gate_ctrl) 292 if (fe->ops.i2c_gate_ctrl)
294 fe->ops->i2c_gate_ctrl(fe, 0); 293 fe->ops.i2c_gate_ctrl(fe, 0);
295 } 294 }
296 295
297 mt352_write(fe, buf, 8); 296 mt352_write(fe, buf, 8);
298 mt352_write(fe, fsm_go, 2); 297 mt352_write(fe, fsm_go, 2);
299 } else { 298 } else {
300 if (fe->ops->tuner_ops.calc_regs) { 299 if (fe->ops.tuner_ops.calc_regs) {
301 fe->ops->tuner_ops.calc_regs(fe, param, buf+8, 5); 300 fe->ops.tuner_ops.calc_regs(fe, param, buf+8, 5);
302 buf[8] <<= 1; 301 buf[8] <<= 1;
303 mt352_write(fe, buf, sizeof(buf)); 302 mt352_write(fe, buf, sizeof(buf));
304 mt352_write(fe, tuner_go, 2); 303 mt352_write(fe, tuner_go, 2);
@@ -550,13 +549,12 @@ struct dvb_frontend* mt352_attach(const struct mt352_config* config,
550 /* setup the state */ 549 /* setup the state */
551 state->i2c = i2c; 550 state->i2c = i2c;
552 memcpy(&state->config,config,sizeof(struct mt352_config)); 551 memcpy(&state->config,config,sizeof(struct mt352_config));
553 memcpy(&state->ops, &mt352_ops, sizeof(struct dvb_frontend_ops));
554 552
555 /* check if the demod is there */ 553 /* check if the demod is there */
556 if (mt352_read_register(state, CHIP_ID) != ID_MT352) goto error; 554 if (mt352_read_register(state, CHIP_ID) != ID_MT352) goto error;
557 555
558 /* create dvb_frontend */ 556 /* create dvb_frontend */
559 state->frontend.ops = &state->ops; 557 memcpy(&state->frontend.ops, &mt352_ops, sizeof(struct dvb_frontend_ops));
560 state->frontend.demodulator_priv = state; 558 state->frontend.demodulator_priv = state;
561 return &state->frontend; 559 return &state->frontend;
562 560
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c
index 9b13f14f14f6..55671cb5255e 100644
--- a/drivers/media/dvb/frontends/nxt200x.c
+++ b/drivers/media/dvb/frontends/nxt200x.c
@@ -55,7 +55,6 @@
55struct nxt200x_state { 55struct nxt200x_state {
56 56
57 struct i2c_adapter* i2c; 57 struct i2c_adapter* i2c;
58 struct dvb_frontend_ops ops;
59 const struct nxt200x_config* config; 58 const struct nxt200x_config* config;
60 struct dvb_frontend frontend; 59 struct dvb_frontend frontend;
61 60
@@ -548,8 +547,8 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe,
548 } 547 }
549 548
550 /* get tuning information */ 549 /* get tuning information */
551 if (fe->ops->tuner_ops.calc_regs) { 550 if (fe->ops.tuner_ops.calc_regs) {
552 fe->ops->tuner_ops.calc_regs(fe, p, buf, 5); 551 fe->ops.tuner_ops.calc_regs(fe, p, buf, 5);
553 } 552 }
554 553
555 /* set additional params */ 554 /* set additional params */
@@ -1161,7 +1160,6 @@ struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
1161 /* setup the state */ 1160 /* setup the state */
1162 state->config = config; 1161 state->config = config;
1163 state->i2c = i2c; 1162 state->i2c = i2c;
1164 memcpy(&state->ops, &nxt200x_ops, sizeof(struct dvb_frontend_ops));
1165 state->initialised = 0; 1163 state->initialised = 0;
1166 1164
1167 /* read card id */ 1165 /* read card id */
@@ -1200,7 +1198,7 @@ struct dvb_frontend* nxt200x_attach(const struct nxt200x_config* config,
1200 } 1198 }
1201 1199
1202 /* create dvb_frontend */ 1200 /* create dvb_frontend */
1203 state->frontend.ops = &state->ops; 1201 memcpy(&state->frontend.ops, &nxt200x_ops, sizeof(struct dvb_frontend_ops));
1204 state->frontend.demodulator_priv = state; 1202 state->frontend.demodulator_priv = state;
1205 return &state->frontend; 1203 return &state->frontend;
1206 1204
diff --git a/drivers/media/dvb/frontends/nxt6000.c b/drivers/media/dvb/frontends/nxt6000.c
index bca83266ae8b..d313d7dcf386 100644
--- a/drivers/media/dvb/frontends/nxt6000.c
+++ b/drivers/media/dvb/frontends/nxt6000.c
@@ -33,7 +33,6 @@
33 33
34struct nxt6000_state { 34struct nxt6000_state {
35 struct i2c_adapter* i2c; 35 struct i2c_adapter* i2c;
36 struct dvb_frontend_ops ops;
37 /* configuration settings */ 36 /* configuration settings */
38 const struct nxt6000_config* config; 37 const struct nxt6000_config* config;
39 struct dvb_frontend frontend; 38 struct dvb_frontend frontend;
@@ -463,9 +462,9 @@ static int nxt6000_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
463 struct nxt6000_state* state = fe->demodulator_priv; 462 struct nxt6000_state* state = fe->demodulator_priv;
464 int result; 463 int result;
465 464
466 if (fe->ops->tuner_ops.set_params) { 465 if (fe->ops.tuner_ops.set_params) {
467 fe->ops->tuner_ops.set_params(fe, param); 466 fe->ops.tuner_ops.set_params(fe, param);
468 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 467 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
469 } 468 }
470 469
471 if ((result = nxt6000_set_bandwidth(state, param->u.ofdm.bandwidth)) < 0) 470 if ((result = nxt6000_set_bandwidth(state, param->u.ofdm.bandwidth)) < 0)
@@ -552,13 +551,12 @@ struct dvb_frontend* nxt6000_attach(const struct nxt6000_config* config,
552 /* setup the state */ 551 /* setup the state */
553 state->config = config; 552 state->config = config;
554 state->i2c = i2c; 553 state->i2c = i2c;
555 memcpy(&state->ops, &nxt6000_ops, sizeof(struct dvb_frontend_ops));
556 554
557 /* check if the demod is there */ 555 /* check if the demod is there */
558 if (nxt6000_readreg(state, OFDM_MSC_REV) != NXT6000ASICDEVICE) goto error; 556 if (nxt6000_readreg(state, OFDM_MSC_REV) != NXT6000ASICDEVICE) goto error;
559 557
560 /* create dvb_frontend */ 558 /* create dvb_frontend */
561 state->frontend.ops = &state->ops; 559 memcpy(&state->frontend.ops, &nxt6000_ops, sizeof(struct dvb_frontend_ops));
562 state->frontend.demodulator_priv = state; 560 state->frontend.demodulator_priv = state;
563 return &state->frontend; 561 return &state->frontend;
564 562
diff --git a/drivers/media/dvb/frontends/or51132.c b/drivers/media/dvb/frontends/or51132.c
index 19f75e6ed829..d20ab30c1e83 100644
--- a/drivers/media/dvb/frontends/or51132.c
+++ b/drivers/media/dvb/frontends/or51132.c
@@ -54,7 +54,6 @@ static int debug;
54struct or51132_state 54struct or51132_state
55{ 55{
56 struct i2c_adapter* i2c; 56 struct i2c_adapter* i2c;
57 struct dvb_frontend_ops ops;
58 57
59 /* Configuration settings */ 58 /* Configuration settings */
60 const struct or51132_config* config; 59 const struct or51132_config* config;
@@ -383,9 +382,9 @@ static int or51132_set_parameters(struct dvb_frontend* fe,
383 or51132_setmode(fe); 382 or51132_setmode(fe);
384 } 383 }
385 384
386 if (fe->ops->tuner_ops.set_params) { 385 if (fe->ops.tuner_ops.set_params) {
387 fe->ops->tuner_ops.set_params(fe, param); 386 fe->ops.tuner_ops.set_params(fe, param);
388 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 387 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
389 } 388 }
390 389
391 /* Set to current mode */ 390 /* Set to current mode */
@@ -618,12 +617,11 @@ struct dvb_frontend* or51132_attach(const struct or51132_config* config,
618 /* Setup the state */ 617 /* Setup the state */
619 state->config = config; 618 state->config = config;
620 state->i2c = i2c; 619 state->i2c = i2c;
621 memcpy(&state->ops, &or51132_ops, sizeof(struct dvb_frontend_ops));
622 state->current_frequency = -1; 620 state->current_frequency = -1;
623 state->current_modulation = -1; 621 state->current_modulation = -1;
624 622
625 /* Create dvb_frontend */ 623 /* Create dvb_frontend */
626 state->frontend.ops = &state->ops; 624 memcpy(&state->frontend.ops, &or51132_ops, sizeof(struct dvb_frontend_ops));
627 state->frontend.demodulator_priv = state; 625 state->frontend.demodulator_priv = state;
628 return &state->frontend; 626 return &state->frontend;
629 627
@@ -636,7 +634,7 @@ static struct dvb_frontend_ops or51132_ops = {
636 634
637 .info = { 635 .info = {
638 .name = "Oren OR51132 VSB/QAM Frontend", 636 .name = "Oren OR51132 VSB/QAM Frontend",
639 .type = FE_ATSC, 637 .type = FE_ATSC,
640 .frequency_min = 44000000, 638 .frequency_min = 44000000,
641 .frequency_max = 958000000, 639 .frequency_max = 958000000,
642 .frequency_stepsize = 166666, 640 .frequency_stepsize = 166666,
diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c
index 7c3aed1f546b..26bed616fabe 100644
--- a/drivers/media/dvb/frontends/or51211.c
+++ b/drivers/media/dvb/frontends/or51211.c
@@ -54,7 +54,6 @@ static u8 cmd_buf[] = {0x04,0x01,0x50,0x80,0x06}; // ATSC
54struct or51211_state { 54struct or51211_state {
55 55
56 struct i2c_adapter* i2c; 56 struct i2c_adapter* i2c;
57 struct dvb_frontend_ops ops;
58 57
59 /* Configuration settings */ 58 /* Configuration settings */
60 const struct or51211_config* config; 59 const struct or51211_config* config;
@@ -585,12 +584,11 @@ struct dvb_frontend* or51211_attach(const struct or51211_config* config,
585 /* Setup the state */ 584 /* Setup the state */
586 state->config = config; 585 state->config = config;
587 state->i2c = i2c; 586 state->i2c = i2c;
588 memcpy(&state->ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
589 state->initialized = 0; 587 state->initialized = 0;
590 state->current_frequency = 0; 588 state->current_frequency = 0;
591 589
592 /* Create dvb_frontend */ 590 /* Create dvb_frontend */
593 state->frontend.ops = &state->ops; 591 memcpy(&state->frontend.ops, &or51211_ops, sizeof(struct dvb_frontend_ops));
594 state->frontend.demodulator_priv = state; 592 state->frontend.demodulator_priv = state;
595 return &state->frontend; 593 return &state->frontend;
596 594
diff --git a/drivers/media/dvb/frontends/s5h1420.c b/drivers/media/dvb/frontends/s5h1420.c
index 5dee511544bf..2c2c344c4c64 100644
--- a/drivers/media/dvb/frontends/s5h1420.c
+++ b/drivers/media/dvb/frontends/s5h1420.c
@@ -38,7 +38,6 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
38 38
39struct s5h1420_state { 39struct s5h1420_state {
40 struct i2c_adapter* i2c; 40 struct i2c_adapter* i2c;
41 struct dvb_frontend_ops ops;
42 const struct s5h1420_config* config; 41 const struct s5h1420_config* config;
43 struct dvb_frontend frontend; 42 struct dvb_frontend frontend;
44 43
@@ -595,14 +594,14 @@ static int s5h1420_set_frontend(struct dvb_frontend* fe,
595 (state->fec_inner == p->u.qpsk.fec_inner) && 594 (state->fec_inner == p->u.qpsk.fec_inner) &&
596 (state->symbol_rate == p->u.qpsk.symbol_rate)) { 595 (state->symbol_rate == p->u.qpsk.symbol_rate)) {
597 596
598 if (fe->ops->tuner_ops.set_params) { 597 if (fe->ops.tuner_ops.set_params) {
599 fe->ops->tuner_ops.set_params(fe, p); 598 fe->ops.tuner_ops.set_params(fe, p);
600 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 599 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
601 } 600 }
602 if (fe->ops->tuner_ops.get_frequency) { 601 if (fe->ops.tuner_ops.get_frequency) {
603 u32 tmp; 602 u32 tmp;
604 fe->ops->tuner_ops.get_frequency(fe, &tmp); 603 fe->ops.tuner_ops.get_frequency(fe, &tmp);
605 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 604 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
606 s5h1420_setfreqoffset(state, p->frequency - tmp); 605 s5h1420_setfreqoffset(state, p->frequency - tmp);
607 } else { 606 } else {
608 s5h1420_setfreqoffset(state, 0); 607 s5h1420_setfreqoffset(state, 0);
@@ -652,9 +651,9 @@ static int s5h1420_set_frontend(struct dvb_frontend* fe,
652 s5h1420_writereg(state, 0x05, s5h1420_readreg(state, 0x05) | 1); 651 s5h1420_writereg(state, 0x05, s5h1420_readreg(state, 0x05) | 1);
653 652
654 /* set tuner PLL */ 653 /* set tuner PLL */
655 if (fe->ops->tuner_ops.set_params) { 654 if (fe->ops.tuner_ops.set_params) {
656 fe->ops->tuner_ops.set_params(fe, p); 655 fe->ops.tuner_ops.set_params(fe, p);
657 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 656 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
658 s5h1420_setfreqoffset(state, 0); 657 s5h1420_setfreqoffset(state, 0);
659 } 658 }
660 659
@@ -766,7 +765,6 @@ struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config,
766 /* setup the state */ 765 /* setup the state */
767 state->config = config; 766 state->config = config;
768 state->i2c = i2c; 767 state->i2c = i2c;
769 memcpy(&state->ops, &s5h1420_ops, sizeof(struct dvb_frontend_ops));
770 state->postlocked = 0; 768 state->postlocked = 0;
771 state->fclk = 88000000; 769 state->fclk = 88000000;
772 state->tunedfreq = 0; 770 state->tunedfreq = 0;
@@ -779,7 +777,7 @@ struct dvb_frontend* s5h1420_attach(const struct s5h1420_config* config,
779 goto error; 777 goto error;
780 778
781 /* create dvb_frontend */ 779 /* create dvb_frontend */
782 state->frontend.ops = &state->ops; 780 memcpy(&state->frontend.ops, &s5h1420_ops, sizeof(struct dvb_frontend_ops));
783 state->frontend.demodulator_priv = state; 781 state->frontend.demodulator_priv = state;
784 return &state->frontend; 782 return &state->frontend;
785 783
diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c
index 4d553c0dabb3..44ec5b9a4695 100644
--- a/drivers/media/dvb/frontends/sp8870.c
+++ b/drivers/media/dvb/frontends/sp8870.c
@@ -44,8 +44,6 @@ struct sp8870_state {
44 44
45 struct i2c_adapter* i2c; 45 struct i2c_adapter* i2c;
46 46
47 struct dvb_frontend_ops ops;
48
49 const struct sp8870_config* config; 47 const struct sp8870_config* config;
50 48
51 struct dvb_frontend frontend; 49 struct dvb_frontend frontend;
@@ -262,9 +260,9 @@ static int sp8870_set_frontend_parameters (struct dvb_frontend* fe,
262 sp8870_microcontroller_stop(state); 260 sp8870_microcontroller_stop(state);
263 261
264 // set tuner parameters 262 // set tuner parameters
265 if (fe->ops->tuner_ops.set_params) { 263 if (fe->ops.tuner_ops.set_params) {
266 fe->ops->tuner_ops.set_params(fe, p); 264 fe->ops.tuner_ops.set_params(fe, p);
267 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 265 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
268 } 266 }
269 267
270 // sample rate correction bit [23..17] 268 // sample rate correction bit [23..17]
@@ -566,14 +564,13 @@ struct dvb_frontend* sp8870_attach(const struct sp8870_config* config,
566 /* setup the state */ 564 /* setup the state */
567 state->config = config; 565 state->config = config;
568 state->i2c = i2c; 566 state->i2c = i2c;
569 memcpy(&state->ops, &sp8870_ops, sizeof(struct dvb_frontend_ops));
570 state->initialised = 0; 567 state->initialised = 0;
571 568
572 /* check if the demod is there */ 569 /* check if the demod is there */
573 if (sp8870_readreg(state, 0x0200) < 0) goto error; 570 if (sp8870_readreg(state, 0x0200) < 0) goto error;
574 571
575 /* create dvb_frontend */ 572 /* create dvb_frontend */
576 state->frontend.ops = &state->ops; 573 memcpy(&state->frontend.ops, &sp8870_ops, sizeof(struct dvb_frontend_ops));
577 state->frontend.demodulator_priv = state; 574 state->frontend.demodulator_priv = state;
578 return &state->frontend; 575 return &state->frontend;
579 576
diff --git a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c
index 543dfa145090..b0a2b02f6608 100644
--- a/drivers/media/dvb/frontends/sp887x.c
+++ b/drivers/media/dvb/frontends/sp887x.c
@@ -24,7 +24,6 @@
24 24
25struct sp887x_state { 25struct sp887x_state {
26 struct i2c_adapter* i2c; 26 struct i2c_adapter* i2c;
27 struct dvb_frontend_ops ops;
28 const struct sp887x_config* config; 27 const struct sp887x_config* config;
29 struct dvb_frontend frontend; 28 struct dvb_frontend frontend;
30 29
@@ -353,13 +352,13 @@ static int sp887x_setup_frontend_parameters (struct dvb_frontend* fe,
353 sp887x_microcontroller_stop(state); 352 sp887x_microcontroller_stop(state);
354 353
355 /* setup the PLL */ 354 /* setup the PLL */
356 if (fe->ops->tuner_ops.set_params) { 355 if (fe->ops.tuner_ops.set_params) {
357 fe->ops->tuner_ops.set_params(fe, p); 356 fe->ops.tuner_ops.set_params(fe, p);
358 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 357 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
359 } 358 }
360 if (fe->ops->tuner_ops.get_frequency) { 359 if (fe->ops.tuner_ops.get_frequency) {
361 fe->ops->tuner_ops.get_frequency(fe, &actual_freq); 360 fe->ops.tuner_ops.get_frequency(fe, &actual_freq);
362 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 361 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
363 } else { 362 } else {
364 actual_freq = p->frequency; 363 actual_freq = p->frequency;
365 } 364 }
@@ -564,14 +563,13 @@ struct dvb_frontend* sp887x_attach(const struct sp887x_config* config,
564 /* setup the state */ 563 /* setup the state */
565 state->config = config; 564 state->config = config;
566 state->i2c = i2c; 565 state->i2c = i2c;
567 memcpy(&state->ops, &sp887x_ops, sizeof(struct dvb_frontend_ops));
568 state->initialised = 0; 566 state->initialised = 0;
569 567
570 /* check if the demod is there */ 568 /* check if the demod is there */
571 if (sp887x_readreg(state, 0x0200) < 0) goto error; 569 if (sp887x_readreg(state, 0x0200) < 0) goto error;
572 570
573 /* create dvb_frontend */ 571 /* create dvb_frontend */
574 state->frontend.ops = &state->ops; 572 memcpy(&state->frontend.ops, &sp887x_ops, sizeof(struct dvb_frontend_ops));
575 state->frontend.demodulator_priv = state; 573 state->frontend.demodulator_priv = state;
576 return &state->frontend; 574 return &state->frontend;
577 575
diff --git a/drivers/media/dvb/frontends/stv0297.c b/drivers/media/dvb/frontends/stv0297.c
index 0d74c2bfc99a..1ca64249010c 100644
--- a/drivers/media/dvb/frontends/stv0297.c
+++ b/drivers/media/dvb/frontends/stv0297.c
@@ -32,7 +32,6 @@
32 32
33struct stv0297_state { 33struct stv0297_state {
34 struct i2c_adapter *i2c; 34 struct i2c_adapter *i2c;
35 struct dvb_frontend_ops ops;
36 const struct stv0297_config *config; 35 const struct stv0297_config *config;
37 struct dvb_frontend frontend; 36 struct dvb_frontend frontend;
38 37
@@ -433,9 +432,9 @@ static int stv0297_set_frontend(struct dvb_frontend *fe, struct dvb_frontend_par
433 } 432 }
434 433
435 stv0297_init(fe); 434 stv0297_init(fe);
436 if (fe->ops->tuner_ops.set_params) { 435 if (fe->ops.tuner_ops.set_params) {
437 fe->ops->tuner_ops.set_params(fe, p); 436 fe->ops.tuner_ops.set_params(fe, p);
438 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 437 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
439 } 438 }
440 439
441 /* clear software interrupts */ 440 /* clear software interrupts */
@@ -649,7 +648,6 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config,
649 /* setup the state */ 648 /* setup the state */
650 state->config = config; 649 state->config = config;
651 state->i2c = i2c; 650 state->i2c = i2c;
652 memcpy(&state->ops, &stv0297_ops, sizeof(struct dvb_frontend_ops));
653 state->base_freq = 0; 651 state->base_freq = 0;
654 652
655 /* check if the demod is there */ 653 /* check if the demod is there */
@@ -657,7 +655,7 @@ struct dvb_frontend *stv0297_attach(const struct stv0297_config *config,
657 goto error; 655 goto error;
658 656
659 /* create dvb_frontend */ 657 /* create dvb_frontend */
660 state->frontend.ops = &state->ops; 658 memcpy(&state->frontend.ops, &stv0297_ops, sizeof(struct dvb_frontend_ops));
661 state->frontend.demodulator_priv = state; 659 state->frontend.demodulator_priv = state;
662 return &state->frontend; 660 return &state->frontend;
663 661
diff --git a/drivers/media/dvb/frontends/stv0299.c b/drivers/media/dvb/frontends/stv0299.c
index e91bb5842dc4..96648a75440d 100644
--- a/drivers/media/dvb/frontends/stv0299.c
+++ b/drivers/media/dvb/frontends/stv0299.c
@@ -56,7 +56,6 @@
56 56
57struct stv0299_state { 57struct stv0299_state {
58 struct i2c_adapter* i2c; 58 struct i2c_adapter* i2c;
59 struct dvb_frontend_ops ops;
60 const struct stv0299_config* config; 59 const struct stv0299_config* config;
61 struct dvb_frontend frontend; 60 struct dvb_frontend frontend;
62 61
@@ -547,9 +546,9 @@ static int stv0299_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
547 if (state->config->invert) invval = (~invval) & 1; 546 if (state->config->invert) invval = (~invval) & 1;
548 stv0299_writeregI(state, 0x0c, (stv0299_readreg(state, 0x0c) & 0xfe) | invval); 547 stv0299_writeregI(state, 0x0c, (stv0299_readreg(state, 0x0c) & 0xfe) | invval);
549 548
550 if (fe->ops->tuner_ops.set_params) { 549 if (fe->ops.tuner_ops.set_params) {
551 fe->ops->tuner_ops.set_params(fe, p); 550 fe->ops.tuner_ops.set_params(fe, p);
552 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 551 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
553 } 552 }
554 553
555 stv0299_set_FEC (state, p->u.qpsk.fec_inner); 554 stv0299_set_FEC (state, p->u.qpsk.fec_inner);
@@ -648,7 +647,6 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
648 /* setup the state */ 647 /* setup the state */
649 state->config = config; 648 state->config = config;
650 state->i2c = i2c; 649 state->i2c = i2c;
651 memcpy(&state->ops, &stv0299_ops, sizeof(struct dvb_frontend_ops));
652 state->initialised = 0; 650 state->initialised = 0;
653 state->tuner_frequency = 0; 651 state->tuner_frequency = 0;
654 state->symbol_rate = 0; 652 state->symbol_rate = 0;
@@ -665,7 +663,7 @@ struct dvb_frontend* stv0299_attach(const struct stv0299_config* config,
665 if (id != 0xa1 && id != 0x80) goto error; 663 if (id != 0xa1 && id != 0x80) goto error;
666 664
667 /* create dvb_frontend */ 665 /* create dvb_frontend */
668 state->frontend.ops = &state->ops; 666 memcpy(&state->frontend.ops, &stv0299_ops, sizeof(struct dvb_frontend_ops));
669 state->frontend.demodulator_priv = state; 667 state->frontend.demodulator_priv = state;
670 return &state->frontend; 668 return &state->frontend;
671 669
diff --git a/drivers/media/dvb/frontends/tda10021.c b/drivers/media/dvb/frontends/tda10021.c
index c42997917191..e83ff2104c9b 100644
--- a/drivers/media/dvb/frontends/tda10021.c
+++ b/drivers/media/dvb/frontends/tda10021.c
@@ -36,7 +36,6 @@
36 36
37struct tda10021_state { 37struct tda10021_state {
38 struct i2c_adapter* i2c; 38 struct i2c_adapter* i2c;
39 struct dvb_frontend_ops ops;
40 /* configuration settings */ 39 /* configuration settings */
41 const struct tda10021_config* config; 40 const struct tda10021_config* config;
42 struct dvb_frontend frontend; 41 struct dvb_frontend frontend;
@@ -260,9 +259,9 @@ static int tda10021_set_parameters (struct dvb_frontend *fe,
260 259
261 //printk("tda10021: set frequency to %d qam=%d symrate=%d\n", p->frequency,qam,p->u.qam.symbol_rate); 260 //printk("tda10021: set frequency to %d qam=%d symrate=%d\n", p->frequency,qam,p->u.qam.symbol_rate);
262 261
263 if (fe->ops->tuner_ops.set_params) { 262 if (fe->ops.tuner_ops.set_params) {
264 fe->ops->tuner_ops.set_params(fe, p); 263 fe->ops.tuner_ops.set_params(fe, p);
265 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 264 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
266 } 265 }
267 266
268 tda10021_set_symbolrate (state, p->u.qam.symbol_rate); 267 tda10021_set_symbolrate (state, p->u.qam.symbol_rate);
@@ -421,7 +420,6 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config,
421 /* setup the state */ 420 /* setup the state */
422 state->config = config; 421 state->config = config;
423 state->i2c = i2c; 422 state->i2c = i2c;
424 memcpy(&state->ops, &tda10021_ops, sizeof(struct dvb_frontend_ops));
425 state->pwm = pwm; 423 state->pwm = pwm;
426 state->reg0 = tda10021_inittab[0]; 424 state->reg0 = tda10021_inittab[0];
427 425
@@ -429,7 +427,7 @@ struct dvb_frontend* tda10021_attach(const struct tda10021_config* config,
429 if ((tda10021_readreg(state, 0x1a) & 0xf0) != 0x70) goto error; 427 if ((tda10021_readreg(state, 0x1a) & 0xf0) != 0x70) goto error;
430 428
431 /* create dvb_frontend */ 429 /* create dvb_frontend */
432 state->frontend.ops = &state->ops; 430 memcpy(&state->frontend.ops, &tda10021_ops, sizeof(struct dvb_frontend_ops));
433 state->frontend.demodulator_priv = state; 431 state->frontend.demodulator_priv = state;
434 return &state->frontend; 432 return &state->frontend;
435 433
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
index 5288b44cf62c..59a2ed614fca 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -47,7 +47,6 @@ enum tda1004x_demod {
47 47
48struct tda1004x_state { 48struct tda1004x_state {
49 struct i2c_adapter* i2c; 49 struct i2c_adapter* i2c;
50 struct dvb_frontend_ops ops;
51 const struct tda1004x_config* config; 50 const struct tda1004x_config* config;
52 struct dvb_frontend frontend; 51 struct dvb_frontend frontend;
53 52
@@ -695,9 +694,9 @@ static int tda1004x_set_fe(struct dvb_frontend* fe,
695 } 694 }
696 695
697 // set frequency 696 // set frequency
698 if (fe->ops->tuner_ops.set_params) { 697 if (fe->ops.tuner_ops.set_params) {
699 fe->ops->tuner_ops.set_params(fe, fe_params); 698 fe->ops.tuner_ops.set_params(fe, fe_params);
700 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 699 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
701 } 700 }
702 701
703 // Hardcoded to use auto as much as possible on the TDA10045 as it 702 // Hardcoded to use auto as much as possible on the TDA10045 as it
@@ -1243,7 +1242,6 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
1243 /* setup the state */ 1242 /* setup the state */
1244 state->config = config; 1243 state->config = config;
1245 state->i2c = i2c; 1244 state->i2c = i2c;
1246 memcpy(&state->ops, &tda10045_ops, sizeof(struct dvb_frontend_ops));
1247 state->demod_type = TDA1004X_DEMOD_TDA10045; 1245 state->demod_type = TDA1004X_DEMOD_TDA10045;
1248 1246
1249 /* check if the demod is there */ 1247 /* check if the demod is there */
@@ -1253,7 +1251,7 @@ struct dvb_frontend* tda10045_attach(const struct tda1004x_config* config,
1253 } 1251 }
1254 1252
1255 /* create dvb_frontend */ 1253 /* create dvb_frontend */
1256 state->frontend.ops = &state->ops; 1254 memcpy(&state->frontend.ops, &tda10045_ops, sizeof(struct dvb_frontend_ops));
1257 state->frontend.demodulator_priv = state; 1255 state->frontend.demodulator_priv = state;
1258 return &state->frontend; 1256 return &state->frontend;
1259} 1257}
@@ -1302,7 +1300,6 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
1302 /* setup the state */ 1300 /* setup the state */
1303 state->config = config; 1301 state->config = config;
1304 state->i2c = i2c; 1302 state->i2c = i2c;
1305 memcpy(&state->ops, &tda10046_ops, sizeof(struct dvb_frontend_ops));
1306 state->demod_type = TDA1004X_DEMOD_TDA10046; 1303 state->demod_type = TDA1004X_DEMOD_TDA10046;
1307 1304
1308 /* check if the demod is there */ 1305 /* check if the demod is there */
@@ -1312,7 +1309,7 @@ struct dvb_frontend* tda10046_attach(const struct tda1004x_config* config,
1312 } 1309 }
1313 1310
1314 /* create dvb_frontend */ 1311 /* create dvb_frontend */
1315 state->frontend.ops = &state->ops; 1312 memcpy(&state->frontend.ops, &tda10046_ops, sizeof(struct dvb_frontend_ops));
1316 state->frontend.demodulator_priv = state; 1313 state->frontend.demodulator_priv = state;
1317 return &state->frontend; 1314 return &state->frontend;
1318} 1315}
diff --git a/drivers/media/dvb/frontends/tda8083.c b/drivers/media/dvb/frontends/tda8083.c
index 0aeaec890296..3aa45ebbac3d 100644
--- a/drivers/media/dvb/frontends/tda8083.c
+++ b/drivers/media/dvb/frontends/tda8083.c
@@ -37,7 +37,6 @@
37 37
38struct tda8083_state { 38struct tda8083_state {
39 struct i2c_adapter* i2c; 39 struct i2c_adapter* i2c;
40 struct dvb_frontend_ops ops;
41 /* configuration settings */ 40 /* configuration settings */
42 const struct tda8083_config* config; 41 const struct tda8083_config* config;
43 struct dvb_frontend frontend; 42 struct dvb_frontend frontend;
@@ -293,9 +292,9 @@ static int tda8083_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
293{ 292{
294 struct tda8083_state* state = fe->demodulator_priv; 293 struct tda8083_state* state = fe->demodulator_priv;
295 294
296 if (fe->ops->tuner_ops.set_params) { 295 if (fe->ops.tuner_ops.set_params) {
297 fe->ops->tuner_ops.set_params(fe, p); 296 fe->ops.tuner_ops.set_params(fe, p);
298 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 297 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
299 } 298 }
300 299
301 tda8083_set_inversion (state, p->inversion); 300 tda8083_set_inversion (state, p->inversion);
@@ -397,13 +396,12 @@ struct dvb_frontend* tda8083_attach(const struct tda8083_config* config,
397 /* setup the state */ 396 /* setup the state */
398 state->config = config; 397 state->config = config;
399 state->i2c = i2c; 398 state->i2c = i2c;
400 memcpy(&state->ops, &tda8083_ops, sizeof(struct dvb_frontend_ops));
401 399
402 /* check if the demod is there */ 400 /* check if the demod is there */
403 if ((tda8083_readreg(state, 0x00)) != 0x05) goto error; 401 if ((tda8083_readreg(state, 0x00)) != 0x05) goto error;
404 402
405 /* create dvb_frontend */ 403 /* create dvb_frontend */
406 state->frontend.ops = &state->ops; 404 memcpy(&state->frontend.ops, &tda8083_ops, sizeof(struct dvb_frontend_ops));
407 state->frontend.demodulator_priv = state; 405 state->frontend.demodulator_priv = state;
408 return &state->frontend; 406 return &state->frontend;
409 407
diff --git a/drivers/media/dvb/frontends/ves1820.c b/drivers/media/dvb/frontends/ves1820.c
index 9810e2dcbbec..6bffe85c161c 100644
--- a/drivers/media/dvb/frontends/ves1820.c
+++ b/drivers/media/dvb/frontends/ves1820.c
@@ -35,7 +35,6 @@
35 35
36struct ves1820_state { 36struct ves1820_state {
37 struct i2c_adapter* i2c; 37 struct i2c_adapter* i2c;
38 struct dvb_frontend_ops ops;
39 /* configuration settings */ 38 /* configuration settings */
40 const struct ves1820_config* config; 39 const struct ves1820_config* config;
41 struct dvb_frontend frontend; 40 struct dvb_frontend frontend;
@@ -220,9 +219,9 @@ static int ves1820_set_parameters(struct dvb_frontend* fe, struct dvb_frontend_p
220 if (real_qam < 0 || real_qam > 4) 219 if (real_qam < 0 || real_qam > 4)
221 return -EINVAL; 220 return -EINVAL;
222 221
223 if (fe->ops->tuner_ops.set_params) { 222 if (fe->ops.tuner_ops.set_params) {
224 fe->ops->tuner_ops.set_params(fe, p); 223 fe->ops.tuner_ops.set_params(fe, p);
225 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 224 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
226 } 225 }
227 226
228 ves1820_set_symbolrate(state, p->u.qam.symbol_rate); 227 ves1820_set_symbolrate(state, p->u.qam.symbol_rate);
@@ -381,7 +380,6 @@ struct dvb_frontend* ves1820_attach(const struct ves1820_config* config,
381 goto error; 380 goto error;
382 381
383 /* setup the state */ 382 /* setup the state */
384 memcpy(&state->ops, &ves1820_ops, sizeof(struct dvb_frontend_ops));
385 state->reg0 = ves1820_inittab[0]; 383 state->reg0 = ves1820_inittab[0];
386 state->config = config; 384 state->config = config;
387 state->i2c = i2c; 385 state->i2c = i2c;
@@ -394,12 +392,12 @@ struct dvb_frontend* ves1820_attach(const struct ves1820_config* config,
394 if (verbose) 392 if (verbose)
395 printk("ves1820: pwm=0x%02x\n", state->pwm); 393 printk("ves1820: pwm=0x%02x\n", state->pwm);
396 394
397 state->ops.info.symbol_rate_min = (state->config->xin / 2) / 64; /* SACLK/64 == (XIN/2)/64 */
398 state->ops.info.symbol_rate_max = (state->config->xin / 2) / 4; /* SACLK/4 */
399
400 /* create dvb_frontend */ 395 /* create dvb_frontend */
401 state->frontend.ops = &state->ops; 396 memcpy(&state->frontend.ops, &ves1820_ops, sizeof(struct dvb_frontend_ops));
397 state->frontend.ops.info.symbol_rate_min = (state->config->xin / 2) / 64; /* SACLK/64 == (XIN/2)/64 */
398 state->frontend.ops.info.symbol_rate_max = (state->config->xin / 2) / 4; /* SACLK/4 */
402 state->frontend.demodulator_priv = state; 399 state->frontend.demodulator_priv = state;
400
403 return &state->frontend; 401 return &state->frontend;
404 402
405error: 403error:
diff --git a/drivers/media/dvb/frontends/ves1x93.c b/drivers/media/dvb/frontends/ves1x93.c
index 660aa7bb90d0..54d7b07571b8 100644
--- a/drivers/media/dvb/frontends/ves1x93.c
+++ b/drivers/media/dvb/frontends/ves1x93.c
@@ -36,7 +36,6 @@
36 36
37struct ves1x93_state { 37struct ves1x93_state {
38 struct i2c_adapter* i2c; 38 struct i2c_adapter* i2c;
39 struct dvb_frontend_ops ops;
40 /* configuration settings */ 39 /* configuration settings */
41 const struct ves1x93_config* config; 40 const struct ves1x93_config* config;
42 struct dvb_frontend frontend; 41 struct dvb_frontend frontend;
@@ -389,9 +388,9 @@ static int ves1x93_set_frontend(struct dvb_frontend* fe, struct dvb_frontend_par
389{ 388{
390 struct ves1x93_state* state = fe->demodulator_priv; 389 struct ves1x93_state* state = fe->demodulator_priv;
391 390
392 if (fe->ops->tuner_ops.set_params) { 391 if (fe->ops.tuner_ops.set_params) {
393 fe->ops->tuner_ops.set_params(fe, p); 392 fe->ops.tuner_ops.set_params(fe, p);
394 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 393 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
395 } 394 }
396 ves1x93_set_inversion (state, p->inversion); 395 ves1x93_set_inversion (state, p->inversion);
397 ves1x93_set_fec (state, p->u.qpsk.fec_inner); 396 ves1x93_set_fec (state, p->u.qpsk.fec_inner);
@@ -463,7 +462,6 @@ struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config,
463 /* setup the state */ 462 /* setup the state */
464 state->config = config; 463 state->config = config;
465 state->i2c = i2c; 464 state->i2c = i2c;
466 memcpy(&state->ops, &ves1x93_ops, sizeof(struct dvb_frontend_ops));
467 state->inversion = INVERSION_OFF; 465 state->inversion = INVERSION_OFF;
468 466
469 /* check if the demod is there + identify it */ 467 /* check if the demod is there + identify it */
@@ -498,7 +496,7 @@ struct dvb_frontend* ves1x93_attach(const struct ves1x93_config* config,
498 } 496 }
499 497
500 /* create dvb_frontend */ 498 /* create dvb_frontend */
501 state->frontend.ops = &state->ops; 499 memcpy(&state->frontend.ops, &ves1x93_ops, sizeof(struct dvb_frontend_ops));
502 state->frontend.demodulator_priv = state; 500 state->frontend.demodulator_priv = state;
503 return &state->frontend; 501 return &state->frontend;
504 502
diff --git a/drivers/media/dvb/frontends/zl10353.c b/drivers/media/dvb/frontends/zl10353.c
index ac39f5519621..2b95e8b6cd39 100644
--- a/drivers/media/dvb/frontends/zl10353.c
+++ b/drivers/media/dvb/frontends/zl10353.c
@@ -34,7 +34,6 @@
34struct zl10353_state { 34struct zl10353_state {
35 struct i2c_adapter *i2c; 35 struct i2c_adapter *i2c;
36 struct dvb_frontend frontend; 36 struct dvb_frontend frontend;
37 struct dvb_frontend_ops ops;
38 37
39 struct zl10353_config config; 38 struct zl10353_config config;
40}; 39};
@@ -146,15 +145,15 @@ static int zl10353_set_parameters(struct dvb_frontend *fe,
146 // if there is no attached secondary tuner, we call set_params to program 145 // if there is no attached secondary tuner, we call set_params to program
147 // a potential tuner attached somewhere else 146 // a potential tuner attached somewhere else
148 if (state->config.no_tuner) { 147 if (state->config.no_tuner) {
149 if (fe->ops->tuner_ops.set_params) { 148 if (fe->ops.tuner_ops.set_params) {
150 fe->ops->tuner_ops.set_params(fe, param); 149 fe->ops.tuner_ops.set_params(fe, param);
151 if (fe->ops->i2c_gate_ctrl) fe->ops->i2c_gate_ctrl(fe, 0); 150 if (fe->ops.i2c_gate_ctrl) fe->ops.i2c_gate_ctrl(fe, 0);
152 } 151 }
153 } 152 }
154 153
155 // if pllbuf is defined, retrieve the settings 154 // if pllbuf is defined, retrieve the settings
156 if (fe->ops->tuner_ops.calc_regs) { 155 if (fe->ops.tuner_ops.calc_regs) {
157 fe->ops->tuner_ops.calc_regs(fe, param, pllbuf+1, 5); 156 fe->ops.tuner_ops.calc_regs(fe, param, pllbuf+1, 5);
158 pllbuf[1] <<= 1; 157 pllbuf[1] <<= 1;
159 } else { 158 } else {
160 // fake pllbuf settings 159 // fake pllbuf settings
@@ -278,14 +277,13 @@ struct dvb_frontend *zl10353_attach(const struct zl10353_config *config,
278 /* setup the state */ 277 /* setup the state */
279 state->i2c = i2c; 278 state->i2c = i2c;
280 memcpy(&state->config, config, sizeof(struct zl10353_config)); 279 memcpy(&state->config, config, sizeof(struct zl10353_config));
281 memcpy(&state->ops, &zl10353_ops, sizeof(struct dvb_frontend_ops));
282 280
283 /* check if the demod is there */ 281 /* check if the demod is there */
284 if (zl10353_read_register(state, CHIP_ID) != ID_ZL10353) 282 if (zl10353_read_register(state, CHIP_ID) != ID_ZL10353)
285 goto error; 283 goto error;
286 284
287 /* create dvb_frontend */ 285 /* create dvb_frontend */
288 state->frontend.ops = &state->ops; 286 memcpy(&state->frontend.ops, &zl10353_ops, sizeof(struct dvb_frontend_ops));
289 state->frontend.demodulator_priv = state; 287 state->frontend.demodulator_priv = state;
290 288
291 return &state->frontend; 289 return &state->frontend;
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c
index 5cc609d986d4..acabea0793b6 100644
--- a/drivers/media/dvb/pluto2/pluto2.c
+++ b/drivers/media/dvb/pluto2/pluto2.c
@@ -473,8 +473,8 @@ static int lg_tdtpe001p_tuner_set_params(struct dvb_frontend *fe,
473 msg.buf = buf; 473 msg.buf = buf;
474 msg.len = sizeof(buf); 474 msg.len = sizeof(buf);
475 475
476 if (fe->ops->i2c_gate_ctrl) 476 if (fe->ops.i2c_gate_ctrl)
477 fe->ops->i2c_gate_ctrl(fe, 1); 477 fe->ops.i2c_gate_ctrl(fe, 1);
478 ret = i2c_transfer(&pluto->i2c_adap, &msg, 1); 478 ret = i2c_transfer(&pluto->i2c_adap, &msg, 1);
479 if (ret < 0) 479 if (ret < 0)
480 return ret; 480 return ret;
@@ -511,12 +511,12 @@ static int __devinit frontend_init(struct pluto *pluto)
511 dev_err(&pluto->pdev->dev, "could not attach frontend\n"); 511 dev_err(&pluto->pdev->dev, "could not attach frontend\n");
512 return -ENODEV; 512 return -ENODEV;
513 } 513 }
514 pluto->fe->ops->tuner_ops.set_params = lg_tdtpe001p_tuner_set_params; 514 pluto->fe->ops.tuner_ops.set_params = lg_tdtpe001p_tuner_set_params;
515 515
516 ret = dvb_register_frontend(&pluto->dvb_adapter, pluto->fe); 516 ret = dvb_register_frontend(&pluto->dvb_adapter, pluto->fe);
517 if (ret < 0) { 517 if (ret < 0) {
518 if (pluto->fe->ops->release) 518 if (pluto->fe->ops.release)
519 pluto->fe->ops->release(pluto->fe); 519 pluto->fe->ops.release(pluto->fe);
520 return ret; 520 return ret;
521 } 521 }
522 522
diff --git a/drivers/media/dvb/ttpci/av7110.c b/drivers/media/dvb/ttpci/av7110.c
index be0a04caf923..8832f80c05f7 100644
--- a/drivers/media/dvb/ttpci/av7110.c
+++ b/drivers/media/dvb/ttpci/av7110.c
@@ -1575,8 +1575,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1575 // NOTE: since we're using a prescaler of 2, we set the 1575 // NOTE: since we're using a prescaler of 2, we set the
1576 // divisor frequency to 62.5kHz and divide by 125 above 1576 // divisor frequency to 62.5kHz and divide by 125 above
1577 1577
1578 if (fe->ops->i2c_gate_ctrl) 1578 if (fe->ops.i2c_gate_ctrl)
1579 fe->ops->i2c_gate_ctrl(fe, 1); 1579 fe->ops.i2c_gate_ctrl(fe, 1);
1580 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) 1580 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1)
1581 return -EIO; 1581 return -EIO;
1582 return 0; 1582 return 0;
@@ -1602,8 +1602,8 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1602 data[2] = 0x85 | ((div >> 10) & 0x60); 1602 data[2] = 0x85 | ((div >> 10) & 0x60);
1603 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); 1603 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81);
1604 1604
1605 if (fe->ops->i2c_gate_ctrl) 1605 if (fe->ops.i2c_gate_ctrl)
1606 fe->ops->i2c_gate_ctrl(fe, 1); 1606 fe->ops.i2c_gate_ctrl(fe, 1);
1607 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1607 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1608 return -EIO; 1608 return -EIO;
1609 return 0; 1609 return 0;
@@ -1632,8 +1632,8 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv
1632 data[2] = 0x8e; 1632 data[2] = 0x8e;
1633 data[3] = 0x00; 1633 data[3] = 0x00;
1634 1634
1635 if (fe->ops->i2c_gate_ctrl) 1635 if (fe->ops.i2c_gate_ctrl)
1636 fe->ops->i2c_gate_ctrl(fe, 1); 1636 fe->ops.i2c_gate_ctrl(fe, 1);
1637 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1637 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1638 return -EIO; 1638 return -EIO;
1639 return 0; 1639 return 0;
@@ -1660,8 +1660,8 @@ static int philips_cd1516_tuner_set_params(struct dvb_frontend* fe, struct dvb_f
1660 data[2] = 0x8e; 1660 data[2] = 0x8e;
1661 data[3] = (f < 174000000 ? 0xa1 : f < 470000000 ? 0x92 : 0x34); 1661 data[3] = (f < 174000000 ? 0xa1 : f < 470000000 ? 0x92 : 0x34);
1662 1662
1663 if (fe->ops->i2c_gate_ctrl) 1663 if (fe->ops.i2c_gate_ctrl)
1664 fe->ops->i2c_gate_ctrl(fe, 1); 1664 fe->ops.i2c_gate_ctrl(fe, 1);
1665 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1665 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1666 return -EIO; 1666 return -EIO;
1667 return 0; 1667 return 0;
@@ -1695,8 +1695,8 @@ static int alps_tdlb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1695 data[2] = 0x85; 1695 data[2] = 0x85;
1696 data[3] = pwr << 6; 1696 data[3] = pwr << 6;
1697 1697
1698 if (fe->ops->i2c_gate_ctrl) 1698 if (fe->ops.i2c_gate_ctrl)
1699 fe->ops->i2c_gate_ctrl(fe, 1); 1699 fe->ops.i2c_gate_ctrl(fe, 1);
1700 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) 1700 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1)
1701 return -EIO; 1701 return -EIO;
1702 return 0; 1702 return 0;
@@ -1835,8 +1835,8 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_
1835 else 1835 else
1836 return -EINVAL; 1836 return -EINVAL;
1837 1837
1838 if (fe->ops->i2c_gate_ctrl) 1838 if (fe->ops.i2c_gate_ctrl)
1839 fe->ops->i2c_gate_ctrl(fe, 1); 1839 fe->ops.i2c_gate_ctrl(fe, 1);
1840 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) { 1840 if (i2c_transfer(&av7110->i2c_adap, &msg, 1) != 1) {
1841 printk("nexusca: pll transfer failed!\n"); 1841 printk("nexusca: pll transfer failed!\n");
1842 return -EIO; 1842 return -EIO;
@@ -1844,8 +1844,8 @@ static int nexusca_stv0297_tuner_set_params(struct dvb_frontend* fe, struct dvb_
1844 1844
1845 // wait for PLL lock 1845 // wait for PLL lock
1846 for(i = 0; i < 20; i++) { 1846 for(i = 0; i < 20; i++) {
1847 if (fe->ops->i2c_gate_ctrl) 1847 if (fe->ops.i2c_gate_ctrl)
1848 fe->ops->i2c_gate_ctrl(fe, 1); 1848 fe->ops.i2c_gate_ctrl(fe, 1);
1849 if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1) 1849 if (i2c_transfer(&av7110->i2c_adap, &readmsg, 1) == 1)
1850 if (data[0] & 0x40) break; 1850 if (data[0] & 0x40) break;
1851 msleep(10); 1851 msleep(10);
@@ -1891,8 +1891,8 @@ static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dv
1891 data[2] = ((div >> 10) & 0x60) | cfg; 1891 data[2] = ((div >> 10) & 0x60) | cfg;
1892 data[3] = (cpump << 6) | band_select; 1892 data[3] = (cpump << 6) | band_select;
1893 1893
1894 if (fe->ops->i2c_gate_ctrl) 1894 if (fe->ops.i2c_gate_ctrl)
1895 fe->ops->i2c_gate_ctrl(fe, 1); 1895 fe->ops.i2c_gate_ctrl(fe, 1);
1896 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO; 1896 if (i2c_transfer (&av7110->i2c_adap, &msg, 1) != 1) return -EIO;
1897 return 0; 1897 return 0;
1898} 1898}
@@ -2085,7 +2085,7 @@ static int frontend_init(struct av7110 *av7110)
2085 av7110->fe = ves1820_attach(&philips_cd1516_config, 2085 av7110->fe = ves1820_attach(&philips_cd1516_config,
2086 &av7110->i2c_adap, read_pwm(av7110)); 2086 &av7110->i2c_adap, read_pwm(av7110));
2087 if (av7110->fe) { 2087 if (av7110->fe) {
2088 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params; 2088 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
2089 } 2089 }
2090 break; 2090 break;
2091 } 2091 }
@@ -2099,10 +2099,10 @@ static int frontend_init(struct av7110 *av7110)
2099 // try the ALPS BSRV2 first of all 2099 // try the ALPS BSRV2 first of all
2100 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2100 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap);
2101 if (av7110->fe) { 2101 if (av7110->fe) {
2102 av7110->fe->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 2102 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2103 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2103 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2104 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2104 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2105 av7110->fe->ops->set_tone = av7110_set_tone; 2105 av7110->fe->ops.set_tone = av7110_set_tone;
2106 av7110->recover = dvb_s_recover; 2106 av7110->recover = dvb_s_recover;
2107 break; 2107 break;
2108 } 2108 }
@@ -2110,12 +2110,12 @@ static int frontend_init(struct av7110 *av7110)
2110 // try the ALPS BSRU6 now 2110 // try the ALPS BSRU6 now
2111 av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap); 2111 av7110->fe = stv0299_attach(&alps_bsru6_config, &av7110->i2c_adap);
2112 if (av7110->fe) { 2112 if (av7110->fe) {
2113 av7110->fe->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 2113 av7110->fe->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
2114 av7110->fe->tuner_priv = &av7110->i2c_adap; 2114 av7110->fe->tuner_priv = &av7110->i2c_adap;
2115 2115
2116 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2116 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2117 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2117 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2118 av7110->fe->ops->set_tone = av7110_set_tone; 2118 av7110->fe->ops.set_tone = av7110_set_tone;
2119 av7110->recover = dvb_s_recover; 2119 av7110->recover = dvb_s_recover;
2120 break; 2120 break;
2121 } 2121 }
@@ -2123,10 +2123,10 @@ static int frontend_init(struct av7110 *av7110)
2123 // Try the grundig 29504-451 2123 // Try the grundig 29504-451
2124 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2124 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
2125 if (av7110->fe) { 2125 if (av7110->fe) {
2126 av7110->fe->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 2126 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2127 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2127 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2128 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2128 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2129 av7110->fe->ops->set_tone = av7110_set_tone; 2129 av7110->fe->ops.set_tone = av7110_set_tone;
2130 av7110->recover = dvb_s_recover; 2130 av7110->recover = dvb_s_recover;
2131 break; 2131 break;
2132 } 2132 }
@@ -2138,7 +2138,7 @@ static int frontend_init(struct av7110 *av7110)
2138 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap, 2138 av7110->fe = ves1820_attach(&philips_cd1516_config, &av7110->i2c_adap,
2139 read_pwm(av7110)); 2139 read_pwm(av7110));
2140 if (av7110->fe) { 2140 if (av7110->fe) {
2141 av7110->fe->ops->tuner_ops.set_params = philips_cd1516_tuner_set_params; 2141 av7110->fe->ops.tuner_ops.set_params = philips_cd1516_tuner_set_params;
2142 } 2142 }
2143 break; 2143 break;
2144 case 0x0003: 2144 case 0x0003:
@@ -2146,7 +2146,7 @@ static int frontend_init(struct av7110 *av7110)
2146 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, 2146 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap,
2147 read_pwm(av7110)); 2147 read_pwm(av7110));
2148 if (av7110->fe) { 2148 if (av7110->fe) {
2149 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2149 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2150 } 2150 }
2151 break; 2151 break;
2152 } 2152 }
@@ -2157,7 +2157,7 @@ static int frontend_init(struct av7110 *av7110)
2157 // ALPS TDLB7 2157 // ALPS TDLB7
2158 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap); 2158 av7110->fe = sp8870_attach(&alps_tdlb7_config, &av7110->i2c_adap);
2159 if (av7110->fe) { 2159 if (av7110->fe) {
2160 av7110->fe->ops->tuner_ops.set_params = alps_tdlb7_tuner_set_params; 2160 av7110->fe->ops.tuner_ops.set_params = alps_tdlb7_tuner_set_params;
2161 } 2161 }
2162 break; 2162 break;
2163 2163
@@ -2165,7 +2165,7 @@ static int frontend_init(struct av7110 *av7110)
2165 2165
2166 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110)); 2166 av7110->fe = ves1820_attach(&alps_tdbe2_config, &av7110->i2c_adap, read_pwm(av7110));
2167 if (av7110->fe) { 2167 if (av7110->fe) {
2168 av7110->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 2168 av7110->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
2169 } 2169 }
2170 break; 2170 break;
2171 2171
@@ -2173,10 +2173,10 @@ static int frontend_init(struct av7110 *av7110)
2173 /* ALPS BSRV2 */ 2173 /* ALPS BSRV2 */
2174 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap); 2174 av7110->fe = ves1x93_attach(&alps_bsrv2_config, &av7110->i2c_adap);
2175 if (av7110->fe) { 2175 if (av7110->fe) {
2176 av7110->fe->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 2176 av7110->fe->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
2177 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2177 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2178 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2178 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2179 av7110->fe->ops->set_tone = av7110_set_tone; 2179 av7110->fe->ops.set_tone = av7110_set_tone;
2180 av7110->recover = dvb_s_recover; 2180 av7110->recover = dvb_s_recover;
2181 } 2181 }
2182 break; 2182 break;
@@ -2185,10 +2185,10 @@ static int frontend_init(struct av7110 *av7110)
2185 /* Grundig 29504-451 */ 2185 /* Grundig 29504-451 */
2186 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap); 2186 av7110->fe = tda8083_attach(&grundig_29504_451_config, &av7110->i2c_adap);
2187 if (av7110->fe) { 2187 if (av7110->fe) {
2188 av7110->fe->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 2188 av7110->fe->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
2189 av7110->fe->ops->diseqc_send_master_cmd = av7110_diseqc_send_master_cmd; 2189 av7110->fe->ops.diseqc_send_master_cmd = av7110_diseqc_send_master_cmd;
2190 av7110->fe->ops->diseqc_send_burst = av7110_diseqc_send_burst; 2190 av7110->fe->ops.diseqc_send_burst = av7110_diseqc_send_burst;
2191 av7110->fe->ops->set_tone = av7110_set_tone; 2191 av7110->fe->ops.set_tone = av7110_set_tone;
2192 av7110->recover = dvb_s_recover; 2192 av7110->recover = dvb_s_recover;
2193 } 2193 }
2194 break; 2194 break;
@@ -2197,7 +2197,7 @@ static int frontend_init(struct av7110 *av7110)
2197 2197
2198 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap); 2198 av7110->fe = l64781_attach(&grundig_29504_401_config, &av7110->i2c_adap);
2199 if (av7110->fe) { 2199 if (av7110->fe) {
2200 av7110->fe->ops->tuner_ops.set_params = grundig_29504_401_tuner_set_params; 2200 av7110->fe->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
2201 } 2201 }
2202 break; 2202 break;
2203 2203
@@ -2205,7 +2205,7 @@ static int frontend_init(struct av7110 *av7110)
2205 2205
2206 av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap); 2206 av7110->fe = stv0297_attach(&nexusca_stv0297_config, &av7110->i2c_adap);
2207 if (av7110->fe) { 2207 if (av7110->fe) {
2208 av7110->fe->ops->tuner_ops.set_params = nexusca_stv0297_tuner_set_params; 2208 av7110->fe->ops.tuner_ops.set_params = nexusca_stv0297_tuner_set_params;
2209 2209
2210 /* set TDA9819 into DVB mode */ 2210 /* set TDA9819 into DVB mode */
2211 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD) 2211 saa7146_setgpio(av7110->dev, 1, SAA7146_GPIO_OUTLO); // TDA9198 pin9(STD)
@@ -2221,16 +2221,16 @@ static int frontend_init(struct av7110 *av7110)
2221 /* ALPS BSBE1 */ 2221 /* ALPS BSBE1 */
2222 av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap); 2222 av7110->fe = stv0299_attach(&alps_bsbe1_config, &av7110->i2c_adap);
2223 if (av7110->fe) { 2223 if (av7110->fe) {
2224 av7110->fe->ops->tuner_ops.set_params = alps_bsbe1_tuner_set_params; 2224 av7110->fe->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params;
2225 av7110->fe->tuner_priv = &av7110->i2c_adap; 2225 av7110->fe->tuner_priv = &av7110->i2c_adap;
2226 2226
2227 if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) { 2227 if (lnbp21_attach(av7110->fe, &av7110->i2c_adap, 0, 0)) {
2228 printk("dvb-ttpci: LNBP21 not found!\n"); 2228 printk("dvb-ttpci: LNBP21 not found!\n");
2229 if (av7110->fe->ops->release) 2229 if (av7110->fe->ops.release)
2230 av7110->fe->ops->release(av7110->fe); 2230 av7110->fe->ops.release(av7110->fe);
2231 av7110->fe = NULL; 2231 av7110->fe = NULL;
2232 } else { 2232 } else {
2233 av7110->fe->ops->dishnetwork_send_legacy_command = NULL; 2233 av7110->fe->ops.dishnetwork_send_legacy_command = NULL;
2234 av7110->recover = dvb_s_recover; 2234 av7110->recover = dvb_s_recover;
2235 } 2235 }
2236 } 2236 }
@@ -2247,21 +2247,21 @@ static int frontend_init(struct av7110 *av7110)
2247 av7110->dev->pci->subsystem_vendor, 2247 av7110->dev->pci->subsystem_vendor,
2248 av7110->dev->pci->subsystem_device); 2248 av7110->dev->pci->subsystem_device);
2249 } else { 2249 } else {
2250 FE_FUNC_OVERRIDE(av7110->fe->ops->init, av7110->fe_init, av7110_fe_init); 2250 FE_FUNC_OVERRIDE(av7110->fe->ops.init, av7110->fe_init, av7110_fe_init);
2251 FE_FUNC_OVERRIDE(av7110->fe->ops->read_status, av7110->fe_read_status, av7110_fe_read_status); 2251 FE_FUNC_OVERRIDE(av7110->fe->ops.read_status, av7110->fe_read_status, av7110_fe_read_status);
2252 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload); 2252 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_reset_overload, av7110->fe_diseqc_reset_overload, av7110_fe_diseqc_reset_overload);
2253 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd); 2253 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_master_cmd, av7110->fe_diseqc_send_master_cmd, av7110_fe_diseqc_send_master_cmd);
2254 FE_FUNC_OVERRIDE(av7110->fe->ops->diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst); 2254 FE_FUNC_OVERRIDE(av7110->fe->ops.diseqc_send_burst, av7110->fe_diseqc_send_burst, av7110_fe_diseqc_send_burst);
2255 FE_FUNC_OVERRIDE(av7110->fe->ops->set_tone, av7110->fe_set_tone, av7110_fe_set_tone); 2255 FE_FUNC_OVERRIDE(av7110->fe->ops.set_tone, av7110->fe_set_tone, av7110_fe_set_tone);
2256 FE_FUNC_OVERRIDE(av7110->fe->ops->set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;) 2256 FE_FUNC_OVERRIDE(av7110->fe->ops.set_voltage, av7110->fe_set_voltage, av7110_fe_set_voltage;)
2257 FE_FUNC_OVERRIDE(av7110->fe->ops->dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command); 2257 FE_FUNC_OVERRIDE(av7110->fe->ops.dishnetwork_send_legacy_command, av7110->fe_dishnetwork_send_legacy_command, av7110_fe_dishnetwork_send_legacy_command);
2258 FE_FUNC_OVERRIDE(av7110->fe->ops->set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend); 2258 FE_FUNC_OVERRIDE(av7110->fe->ops.set_frontend, av7110->fe_set_frontend, av7110_fe_set_frontend);
2259 2259
2260 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe); 2260 ret = dvb_register_frontend(&av7110->dvb_adapter, av7110->fe);
2261 if (ret < 0) { 2261 if (ret < 0) {
2262 printk("av7110: Frontend registration failed!\n"); 2262 printk("av7110: Frontend registration failed!\n");
2263 if (av7110->fe->ops->release) 2263 if (av7110->fe->ops.release)
2264 av7110->fe->ops->release(av7110->fe); 2264 av7110->fe->ops.release(av7110->fe);
2265 av7110->fe = NULL; 2265 av7110->fe = NULL;
2266 } 2266 }
2267 } 2267 }
diff --git a/drivers/media/dvb/ttpci/budget-av.c b/drivers/media/dvb/ttpci/budget-av.c
index 3ff67523cce2..99ab60778853 100644
--- a/drivers/media/dvb/ttpci/budget-av.c
+++ b/drivers/media/dvb/ttpci/budget-av.c
@@ -541,8 +541,8 @@ static int philips_su1278_ty_ci_tuner_set_params(struct dvb_frontend *fe,
541 else if (params->frequency < 2150000) 541 else if (params->frequency < 2150000)
542 buf[3] |= 0xC0; 542 buf[3] |= 0xC0;
543 543
544 if (fe->ops->i2c_gate_ctrl) 544 if (fe->ops.i2c_gate_ctrl)
545 fe->ops->i2c_gate_ctrl(fe, 1); 545 fe->ops.i2c_gate_ctrl(fe, 1);
546 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 546 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
547 return -EIO; 547 return -EIO;
548 return 0; 548 return 0;
@@ -662,22 +662,22 @@ static int philips_su1278sh2_tua6100_tuner_set_params(struct dvb_frontend *fe,
662 reg0[1] |= 0x03; 662 reg0[1] |= 0x03;
663 663
664 /* already enabled - do not reenable i2c repeater or TX fails */ 664 /* already enabled - do not reenable i2c repeater or TX fails */
665 if (fe->ops->i2c_gate_ctrl) 665 if (fe->ops.i2c_gate_ctrl)
666 fe->ops->i2c_gate_ctrl(fe, 1); 666 fe->ops.i2c_gate_ctrl(fe, 1);
667 msg.buf = reg0; 667 msg.buf = reg0;
668 msg.len = sizeof(reg0); 668 msg.len = sizeof(reg0);
669 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 669 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
670 return -EIO; 670 return -EIO;
671 671
672 if (fe->ops->i2c_gate_ctrl) 672 if (fe->ops.i2c_gate_ctrl)
673 fe->ops->i2c_gate_ctrl(fe, 1); 673 fe->ops.i2c_gate_ctrl(fe, 1);
674 msg.buf = reg1; 674 msg.buf = reg1;
675 msg.len = sizeof(reg1); 675 msg.len = sizeof(reg1);
676 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 676 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
677 return -EIO; 677 return -EIO;
678 678
679 if (fe->ops->i2c_gate_ctrl) 679 if (fe->ops.i2c_gate_ctrl)
680 fe->ops->i2c_gate_ctrl(fe, 1); 680 fe->ops.i2c_gate_ctrl(fe, 1);
681 msg.buf = reg2; 681 msg.buf = reg2;
682 msg.len = sizeof(reg2); 682 msg.len = sizeof(reg2);
683 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 683 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
@@ -781,8 +781,8 @@ static int philips_cu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_f
781 buf[3] = (params->frequency < 150000000 ? 0x01 : 781 buf[3] = (params->frequency < 150000000 ? 0x01 :
782 params->frequency < 445000000 ? 0x02 : 0x04); 782 params->frequency < 445000000 ? 0x02 : 0x04);
783 783
784 if (fe->ops->i2c_gate_ctrl) 784 if (fe->ops.i2c_gate_ctrl)
785 fe->ops->i2c_gate_ctrl(fe, 1); 785 fe->ops.i2c_gate_ctrl(fe, 1);
786 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1) 786 if (i2c_transfer(&budget->i2c_adap, &msg, 1) != 1)
787 return -EIO; 787 return -EIO;
788 return 0; 788 return 0;
@@ -802,8 +802,8 @@ static int philips_tu1216_tuner_init(struct dvb_frontend *fe)
802 struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) }; 802 struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) };
803 803
804 // setup PLL configuration 804 // setup PLL configuration
805 if (fe->ops->i2c_gate_ctrl) 805 if (fe->ops.i2c_gate_ctrl)
806 fe->ops->i2c_gate_ctrl(fe, 1); 806 fe->ops.i2c_gate_ctrl(fe, 1);
807 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) 807 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1)
808 return -EIO; 808 return -EIO;
809 msleep(1); 809 msleep(1);
@@ -885,8 +885,8 @@ static int philips_tu1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_f
885 tuner_buf[2] = 0xca; 885 tuner_buf[2] = 0xca;
886 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 886 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
887 887
888 if (fe->ops->i2c_gate_ctrl) 888 if (fe->ops.i2c_gate_ctrl)
889 fe->ops->i2c_gate_ctrl(fe, 1); 889 fe->ops.i2c_gate_ctrl(fe, 1);
890 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) 890 if (i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1)
891 return -EIO; 891 return -EIO;
892 892
@@ -971,8 +971,8 @@ static int philips_sd1878_tda8261_tuner_set_params(struct dvb_frontend *fe,
971 params->frequency, 0); 971 params->frequency, 0);
972 if(rc < 0) return rc; 972 if(rc < 0) return rc;
973 973
974 if (fe->ops->i2c_gate_ctrl) 974 if (fe->ops.i2c_gate_ctrl)
975 fe->ops->i2c_gate_ctrl(fe, 1); 975 fe->ops.i2c_gate_ctrl(fe, 1);
976 if(i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1) 976 if(i2c_transfer(&budget->i2c_adap, &tuner_msg, 1) != 1)
977 return -EIO; 977 return -EIO;
978 978
@@ -1099,13 +1099,13 @@ static void frontend_init(struct budget_av *budget_av)
1099 fe = stv0299_attach(&cinergy_1200s_1894_0010_config, 1099 fe = stv0299_attach(&cinergy_1200s_1894_0010_config,
1100 &budget_av->budget.i2c_adap); 1100 &budget_av->budget.i2c_adap);
1101 if (fe) { 1101 if (fe) {
1102 fe->ops->tuner_ops.set_params = philips_su1278sh2_tua6100_tuner_set_params; 1102 fe->ops.tuner_ops.set_params = philips_su1278sh2_tua6100_tuner_set_params;
1103 } 1103 }
1104 } else { 1104 } else {
1105 fe = stv0299_attach(&typhoon_config, 1105 fe = stv0299_attach(&typhoon_config,
1106 &budget_av->budget.i2c_adap); 1106 &budget_av->budget.i2c_adap);
1107 if (fe) { 1107 if (fe) {
1108 fe->ops->tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; 1108 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params;
1109 } 1109 }
1110 } 1110 }
1111 break; 1111 break;
@@ -1117,7 +1117,7 @@ static void frontend_init(struct budget_av *budget_av)
1117 fe = stv0299_attach(&philips_sd1878_config, 1117 fe = stv0299_attach(&philips_sd1878_config,
1118 &budget_av->budget.i2c_adap); 1118 &budget_av->budget.i2c_adap);
1119 if (fe) { 1119 if (fe) {
1120 fe->ops->tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params; 1120 fe->ops.tuner_ops.set_params = philips_sd1878_tda8261_tuner_set_params;
1121 } 1121 }
1122 break; 1122 break;
1123 1123
@@ -1126,7 +1126,7 @@ static void frontend_init(struct budget_av *budget_av)
1126 fe = stv0299_attach(&typhoon_config, 1126 fe = stv0299_attach(&typhoon_config,
1127 &budget_av->budget.i2c_adap); 1127 &budget_av->budget.i2c_adap);
1128 if (fe) { 1128 if (fe) {
1129 fe->ops->tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; 1129 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params;
1130 } 1130 }
1131 break; 1131 break;
1132 1132
@@ -1134,7 +1134,7 @@ static void frontend_init(struct budget_av *budget_av)
1134 fe = stv0299_attach(&cinergy_1200s_config, 1134 fe = stv0299_attach(&cinergy_1200s_config,
1135 &budget_av->budget.i2c_adap); 1135 &budget_av->budget.i2c_adap);
1136 if (fe) { 1136 if (fe) {
1137 fe->ops->tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params; 1137 fe->ops.tuner_ops.set_params = philips_su1278_ty_ci_tuner_set_params;
1138 } 1138 }
1139 break; 1139 break;
1140 1140
@@ -1147,9 +1147,9 @@ static void frontend_init(struct budget_av *budget_av)
1147 read_pwm(budget_av)); 1147 read_pwm(budget_av));
1148 if (fe) { 1148 if (fe) {
1149 budget_av->tda10021_poclkp = 1; 1149 budget_av->tda10021_poclkp = 1;
1150 budget_av->tda10021_set_frontend = fe->ops->set_frontend; 1150 budget_av->tda10021_set_frontend = fe->ops.set_frontend;
1151 fe->ops->set_frontend = tda10021_set_frontend; 1151 fe->ops.set_frontend = tda10021_set_frontend;
1152 fe->ops->tuner_ops.set_params = philips_cu1216_tuner_set_params; 1152 fe->ops.tuner_ops.set_params = philips_cu1216_tuner_set_params;
1153 } 1153 }
1154 break; 1154 break;
1155 1155
@@ -1160,8 +1160,8 @@ static void frontend_init(struct budget_av *budget_av)
1160 fe = tda10046_attach(&philips_tu1216_config, 1160 fe = tda10046_attach(&philips_tu1216_config,
1161 &budget_av->budget.i2c_adap); 1161 &budget_av->budget.i2c_adap);
1162 if (fe) { 1162 if (fe) {
1163 fe->ops->tuner_ops.init = philips_tu1216_tuner_init; 1163 fe->ops.tuner_ops.init = philips_tu1216_tuner_init;
1164 fe->ops->tuner_ops.set_params = philips_tu1216_tuner_set_params; 1164 fe->ops.tuner_ops.set_params = philips_tu1216_tuner_set_params;
1165 } 1165 }
1166 break; 1166 break;
1167 } 1167 }
@@ -1181,8 +1181,8 @@ static void frontend_init(struct budget_av *budget_av)
1181 if (dvb_register_frontend(&budget_av->budget.dvb_adapter, 1181 if (dvb_register_frontend(&budget_av->budget.dvb_adapter,
1182 budget_av->budget.dvb_frontend)) { 1182 budget_av->budget.dvb_frontend)) {
1183 printk(KERN_ERR "budget-av: Frontend registration failed!\n"); 1183 printk(KERN_ERR "budget-av: Frontend registration failed!\n");
1184 if (budget_av->budget.dvb_frontend->ops->release) 1184 if (budget_av->budget.dvb_frontend->ops.release)
1185 budget_av->budget.dvb_frontend->ops->release(budget_av->budget.dvb_frontend); 1185 budget_av->budget.dvb_frontend->ops.release(budget_av->budget.dvb_frontend);
1186 budget_av->budget.dvb_frontend = NULL; 1186 budget_av->budget.dvb_frontend = NULL;
1187 } 1187 }
1188} 1188}
diff --git a/drivers/media/dvb/ttpci/budget-ci.c b/drivers/media/dvb/ttpci/budget-ci.c
index eb03b140b05c..4b966eea3834 100644
--- a/drivers/media/dvb/ttpci/budget-ci.c
+++ b/drivers/media/dvb/ttpci/budget-ci.c
@@ -649,8 +649,8 @@ static int philips_su1278_tt_tuner_set_params(struct dvb_frontend *fe,
649 else if (params->frequency < 2150000) 649 else if (params->frequency < 2150000)
650 buf[3] |= 0xC0; 650 buf[3] |= 0xC0;
651 651
652 if (fe->ops->i2c_gate_ctrl) 652 if (fe->ops.i2c_gate_ctrl)
653 fe->ops->i2c_gate_ctrl(fe, 1); 653 fe->ops.i2c_gate_ctrl(fe, 1);
654 if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1) 654 if (i2c_transfer(&budget_ci->budget.i2c_adap, &msg, 1) != 1)
655 return -EIO; 655 return -EIO;
656 return 0; 656 return 0;
@@ -680,8 +680,8 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe)
680 sizeof(td1316_init) }; 680 sizeof(td1316_init) };
681 681
682 // setup PLL configuration 682 // setup PLL configuration
683 if (fe->ops->i2c_gate_ctrl) 683 if (fe->ops.i2c_gate_ctrl)
684 fe->ops->i2c_gate_ctrl(fe, 1); 684 fe->ops.i2c_gate_ctrl(fe, 1);
685 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 685 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
686 return -EIO; 686 return -EIO;
687 msleep(1); 687 msleep(1);
@@ -690,11 +690,11 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend *fe)
690 tuner_msg.addr = 0x65; 690 tuner_msg.addr = 0x65;
691 tuner_msg.buf = disable_mc44BC374c; 691 tuner_msg.buf = disable_mc44BC374c;
692 tuner_msg.len = sizeof(disable_mc44BC374c); 692 tuner_msg.len = sizeof(disable_mc44BC374c);
693 if (fe->ops->i2c_gate_ctrl) 693 if (fe->ops.i2c_gate_ctrl)
694 fe->ops->i2c_gate_ctrl(fe, 1); 694 fe->ops.i2c_gate_ctrl(fe, 1);
695 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) { 695 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) {
696 if (fe->ops->i2c_gate_ctrl) 696 if (fe->ops.i2c_gate_ctrl)
697 fe->ops->i2c_gate_ctrl(fe, 1); 697 fe->ops.i2c_gate_ctrl(fe, 1);
698 i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1); 698 i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1);
699 } 699 }
700 700
@@ -777,8 +777,8 @@ static int philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struct dvb
777 tuner_buf[2] = 0xca; 777 tuner_buf[2] = 0xca;
778 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 778 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
779 779
780 if (fe->ops->i2c_gate_ctrl) 780 if (fe->ops.i2c_gate_ctrl)
781 fe->ops->i2c_gate_ctrl(fe, 1); 781 fe->ops.i2c_gate_ctrl(fe, 1);
782 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 782 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
783 return -EIO; 783 return -EIO;
784 784
@@ -863,15 +863,15 @@ static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struc
863 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 863 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
864 tuner_buf[4] = 0x80; 864 tuner_buf[4] = 0x80;
865 865
866 if (fe->ops->i2c_gate_ctrl) 866 if (fe->ops.i2c_gate_ctrl)
867 fe->ops->i2c_gate_ctrl(fe, 1); 867 fe->ops.i2c_gate_ctrl(fe, 1);
868 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 868 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
869 return -EIO; 869 return -EIO;
870 870
871 msleep(50); 871 msleep(50);
872 872
873 if (fe->ops->i2c_gate_ctrl) 873 if (fe->ops.i2c_gate_ctrl)
874 fe->ops->i2c_gate_ctrl(fe, 1); 874 fe->ops.i2c_gate_ctrl(fe, 1);
875 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1) 875 if (i2c_transfer(&budget_ci->budget.i2c_adap, &tuner_msg, 1) != 1)
876 return -EIO; 876 return -EIO;
877 877
@@ -990,7 +990,7 @@ static void frontend_init(struct budget_ci *budget_ci)
990 budget_ci->budget.dvb_frontend = 990 budget_ci->budget.dvb_frontend =
991 stv0299_attach(&alps_bsru6_config, &budget_ci->budget.i2c_adap); 991 stv0299_attach(&alps_bsru6_config, &budget_ci->budget.i2c_adap);
992 if (budget_ci->budget.dvb_frontend) { 992 if (budget_ci->budget.dvb_frontend) {
993 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 993 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
994 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; 994 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap;
995 break; 995 break;
996 } 996 }
@@ -1000,7 +1000,7 @@ static void frontend_init(struct budget_ci *budget_ci)
1000 budget_ci->budget.dvb_frontend = 1000 budget_ci->budget.dvb_frontend =
1001 stv0299_attach(&philips_su1278_tt_config, &budget_ci->budget.i2c_adap); 1001 stv0299_attach(&philips_su1278_tt_config, &budget_ci->budget.i2c_adap);
1002 if (budget_ci->budget.dvb_frontend) { 1002 if (budget_ci->budget.dvb_frontend) {
1003 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = philips_su1278_tt_tuner_set_params; 1003 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_su1278_tt_tuner_set_params;
1004 break; 1004 break;
1005 } 1005 }
1006 break; 1006 break;
@@ -1010,7 +1010,7 @@ static void frontend_init(struct budget_ci *budget_ci)
1010 budget_ci->budget.dvb_frontend = 1010 budget_ci->budget.dvb_frontend =
1011 stv0297_attach(&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap); 1011 stv0297_attach(&dvbc_philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
1012 if (budget_ci->budget.dvb_frontend) { 1012 if (budget_ci->budget.dvb_frontend) {
1013 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; 1013 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params;
1014 break; 1014 break;
1015 } 1015 }
1016 break; 1016 break;
@@ -1020,8 +1020,8 @@ static void frontend_init(struct budget_ci *budget_ci)
1020 budget_ci->budget.dvb_frontend = 1020 budget_ci->budget.dvb_frontend =
1021 tda10045_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); 1021 tda10045_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
1022 if (budget_ci->budget.dvb_frontend) { 1022 if (budget_ci->budget.dvb_frontend) {
1023 budget_ci->budget.dvb_frontend->ops->tuner_ops.init = philips_tdm1316l_tuner_init; 1023 budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init;
1024 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = philips_tdm1316l_tuner_set_params; 1024 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params;
1025 break; 1025 break;
1026 } 1026 }
1027 break; 1027 break;
@@ -1031,8 +1031,8 @@ static void frontend_init(struct budget_ci *budget_ci)
1031 budget_ci->budget.dvb_frontend = 1031 budget_ci->budget.dvb_frontend =
1032 tda10046_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap); 1032 tda10046_attach(&philips_tdm1316l_config, &budget_ci->budget.i2c_adap);
1033 if (budget_ci->budget.dvb_frontend) { 1033 if (budget_ci->budget.dvb_frontend) {
1034 budget_ci->budget.dvb_frontend->ops->tuner_ops.init = philips_tdm1316l_tuner_init; 1034 budget_ci->budget.dvb_frontend->ops.tuner_ops.init = philips_tdm1316l_tuner_init;
1035 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = philips_tdm1316l_tuner_set_params; 1035 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params;
1036 break; 1036 break;
1037 } 1037 }
1038 break; 1038 break;
@@ -1040,14 +1040,14 @@ static void frontend_init(struct budget_ci *budget_ci)
1040 case 0x1017: // TT S-1500 PCI 1040 case 0x1017: // TT S-1500 PCI
1041 budget_ci->budget.dvb_frontend = stv0299_attach(&alps_bsbe1_config, &budget_ci->budget.i2c_adap); 1041 budget_ci->budget.dvb_frontend = stv0299_attach(&alps_bsbe1_config, &budget_ci->budget.i2c_adap);
1042 if (budget_ci->budget.dvb_frontend) { 1042 if (budget_ci->budget.dvb_frontend) {
1043 budget_ci->budget.dvb_frontend->ops->tuner_ops.set_params = alps_bsbe1_tuner_set_params; 1043 budget_ci->budget.dvb_frontend->ops.tuner_ops.set_params = alps_bsbe1_tuner_set_params;
1044 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap; 1044 budget_ci->budget.dvb_frontend->tuner_priv = &budget_ci->budget.i2c_adap;
1045 1045
1046 budget_ci->budget.dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; 1046 budget_ci->budget.dvb_frontend->ops.dishnetwork_send_legacy_command = NULL;
1047 if (lnbp21_attach(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)) { 1047 if (lnbp21_attach(budget_ci->budget.dvb_frontend, &budget_ci->budget.i2c_adap, LNBP21_LLC, 0)) {
1048 printk("%s: No LNBP21 found!\n", __FUNCTION__); 1048 printk("%s: No LNBP21 found!\n", __FUNCTION__);
1049 if (budget_ci->budget.dvb_frontend->ops->release) 1049 if (budget_ci->budget.dvb_frontend->ops.release)
1050 budget_ci->budget.dvb_frontend->ops->release(budget_ci->budget.dvb_frontend); 1050 budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend);
1051 budget_ci->budget.dvb_frontend = NULL; 1051 budget_ci->budget.dvb_frontend = NULL;
1052 } 1052 }
1053 } 1053 }
@@ -1065,8 +1065,8 @@ static void frontend_init(struct budget_ci *budget_ci)
1065 if (dvb_register_frontend 1065 if (dvb_register_frontend
1066 (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) { 1066 (&budget_ci->budget.dvb_adapter, budget_ci->budget.dvb_frontend)) {
1067 printk("budget-ci: Frontend registration failed!\n"); 1067 printk("budget-ci: Frontend registration failed!\n");
1068 if (budget_ci->budget.dvb_frontend->ops->release) 1068 if (budget_ci->budget.dvb_frontend->ops.release)
1069 budget_ci->budget.dvb_frontend->ops->release(budget_ci->budget.dvb_frontend); 1069 budget_ci->budget.dvb_frontend->ops.release(budget_ci->budget.dvb_frontend);
1070 budget_ci->budget.dvb_frontend = NULL; 1070 budget_ci->budget.dvb_frontend = NULL;
1071 } 1071 }
1072 } 1072 }
diff --git a/drivers/media/dvb/ttpci/budget-patch.c b/drivers/media/dvb/ttpci/budget-patch.c
index 3515f524176a..ee60ce90a400 100644
--- a/drivers/media/dvb/ttpci/budget-patch.c
+++ b/drivers/media/dvb/ttpci/budget-patch.c
@@ -281,8 +281,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
281 // NOTE: since we're using a prescaler of 2, we set the 281 // NOTE: since we're using a prescaler of 2, we set the
282 // divisor frequency to 62.5kHz and divide by 125 above 282 // divisor frequency to 62.5kHz and divide by 125 above
283 283
284 if (fe->ops->i2c_gate_ctrl) 284 if (fe->ops.i2c_gate_ctrl)
285 fe->ops->i2c_gate_ctrl(fe, 1); 285 fe->ops.i2c_gate_ctrl(fe, 1);
286 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) 286 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1)
287 return -EIO; 287 return -EIO;
288 return 0; 288 return 0;
@@ -307,8 +307,8 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv
307 data[2] = 0x8e; 307 data[2] = 0x8e;
308 data[3] = 0x00; 308 data[3] = 0x00;
309 309
310 if (fe->ops->i2c_gate_ctrl) 310 if (fe->ops.i2c_gate_ctrl)
311 fe->ops->i2c_gate_ctrl(fe, 1); 311 fe->ops.i2c_gate_ctrl(fe, 1);
312 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) 312 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1)
313 return -EIO; 313 return -EIO;
314 return 0; 314 return 0;
@@ -327,32 +327,32 @@ static void frontend_init(struct budget_patch* budget)
327 // try the ALPS BSRV2 first of all 327 // try the ALPS BSRV2 first of all
328 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); 328 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap);
329 if (budget->dvb_frontend) { 329 if (budget->dvb_frontend) {
330 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 330 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
331 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd; 331 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_patch_diseqc_send_master_cmd;
332 budget->dvb_frontend->ops->diseqc_send_burst = budget_patch_diseqc_send_burst; 332 budget->dvb_frontend->ops.diseqc_send_burst = budget_patch_diseqc_send_burst;
333 budget->dvb_frontend->ops->set_tone = budget_patch_set_tone; 333 budget->dvb_frontend->ops.set_tone = budget_patch_set_tone;
334 break; 334 break;
335 } 335 }
336 336
337 // try the ALPS BSRU6 now 337 // try the ALPS BSRU6 now
338 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 338 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap);
339 if (budget->dvb_frontend) { 339 if (budget->dvb_frontend) {
340 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 340 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
341 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 341 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
342 342
343 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 343 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
344 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 344 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
345 budget->dvb_frontend->ops->set_tone = budget_set_tone; 345 budget->dvb_frontend->ops.set_tone = budget_set_tone;
346 break; 346 break;
347 } 347 }
348 348
349 // Try the grundig 29504-451 349 // Try the grundig 29504-451
350 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); 350 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap);
351 if (budget->dvb_frontend) { 351 if (budget->dvb_frontend) {
352 budget->dvb_frontend->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 352 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
353 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 353 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
354 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 354 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
355 budget->dvb_frontend->ops->set_tone = budget_set_tone; 355 budget->dvb_frontend->ops.set_tone = budget_set_tone;
356 break; 356 break;
357 } 357 }
358 break; 358 break;
@@ -367,8 +367,8 @@ static void frontend_init(struct budget_patch* budget)
367 } else { 367 } else {
368 if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) { 368 if (dvb_register_frontend(&budget->dvb_adapter, budget->dvb_frontend)) {
369 printk("budget-av: Frontend registration failed!\n"); 369 printk("budget-av: Frontend registration failed!\n");
370 if (budget->dvb_frontend->ops->release) 370 if (budget->dvb_frontend->ops.release)
371 budget->dvb_frontend->ops->release(budget->dvb_frontend); 371 budget->dvb_frontend->ops.release(budget->dvb_frontend);
372 budget->dvb_frontend = NULL; 372 budget->dvb_frontend = NULL;
373 } 373 }
374 } 374 }
diff --git a/drivers/media/dvb/ttpci/budget.c b/drivers/media/dvb/ttpci/budget.c
index d98395fefc95..35761f13c12b 100644
--- a/drivers/media/dvb/ttpci/budget.c
+++ b/drivers/media/dvb/ttpci/budget.c
@@ -209,8 +209,8 @@ static int alps_bsrv2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
209 // NOTE: since we're using a prescaler of 2, we set the 209 // NOTE: since we're using a prescaler of 2, we set the
210 // divisor frequency to 62.5kHz and divide by 125 above 210 // divisor frequency to 62.5kHz and divide by 125 above
211 211
212 if (fe->ops->i2c_gate_ctrl) 212 if (fe->ops.i2c_gate_ctrl)
213 fe->ops->i2c_gate_ctrl(fe, 1); 213 fe->ops.i2c_gate_ctrl(fe, 1);
214 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 214 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
215 return 0; 215 return 0;
216} 216}
@@ -236,8 +236,8 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
236 data[2] = 0x85 | ((div >> 10) & 0x60); 236 data[2] = 0x85 | ((div >> 10) & 0x60);
237 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); 237 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81);
238 238
239 if (fe->ops->i2c_gate_ctrl) 239 if (fe->ops.i2c_gate_ctrl)
240 fe->ops->i2c_gate_ctrl(fe, 1); 240 fe->ops.i2c_gate_ctrl(fe, 1);
241 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 241 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
242 return 0; 242 return 0;
243} 243}
@@ -276,8 +276,8 @@ static int grundig_29504_401_tuner_set_params(struct dvb_frontend* fe, struct dv
276 data[2] = ((div >> 10) & 0x60) | cfg; 276 data[2] = ((div >> 10) & 0x60) | cfg;
277 data[3] = (cpump << 6) | band_select; 277 data[3] = (cpump << 6) | band_select;
278 278
279 if (fe->ops->i2c_gate_ctrl) 279 if (fe->ops.i2c_gate_ctrl)
280 fe->ops->i2c_gate_ctrl(fe, 1); 280 fe->ops.i2c_gate_ctrl(fe, 1);
281 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 281 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
282 return 0; 282 return 0;
283} 283}
@@ -299,8 +299,8 @@ static int grundig_29504_451_tuner_set_params(struct dvb_frontend* fe, struct dv
299 data[2] = 0x8e; 299 data[2] = 0x8e;
300 data[3] = 0x00; 300 data[3] = 0x00;
301 301
302 if (fe->ops->i2c_gate_ctrl) 302 if (fe->ops.i2c_gate_ctrl)
303 fe->ops->i2c_gate_ctrl(fe, 1); 303 fe->ops.i2c_gate_ctrl(fe, 1);
304 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 304 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
305 return 0; 305 return 0;
306} 306}
@@ -330,8 +330,8 @@ static int s5h1420_tuner_set_params(struct dvb_frontend* fe, struct dvb_frontend
330 else 330 else
331 data[3] = 0xc0; 331 data[3] = 0xc0;
332 332
333 if (fe->ops->i2c_gate_ctrl) 333 if (fe->ops.i2c_gate_ctrl)
334 fe->ops->i2c_gate_ctrl(fe, 1); 334 fe->ops.i2c_gate_ctrl(fe, 1);
335 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO; 335 if (i2c_transfer (&budget->i2c_adap, &msg, 1) != 1) return -EIO;
336 336
337 return 0; 337 return 0;
@@ -363,21 +363,21 @@ static void frontend_init(struct budget *budget)
363 // try the ALPS BSRV2 first of all 363 // try the ALPS BSRV2 first of all
364 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap); 364 budget->dvb_frontend = ves1x93_attach(&alps_bsrv2_config, &budget->i2c_adap);
365 if (budget->dvb_frontend) { 365 if (budget->dvb_frontend) {
366 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsrv2_tuner_set_params; 366 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsrv2_tuner_set_params;
367 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 367 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
368 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 368 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
369 budget->dvb_frontend->ops->set_tone = budget_set_tone; 369 budget->dvb_frontend->ops.set_tone = budget_set_tone;
370 break; 370 break;
371 } 371 }
372 372
373 // try the ALPS BSRU6 now 373 // try the ALPS BSRU6 now
374 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 374 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap);
375 if (budget->dvb_frontend) { 375 if (budget->dvb_frontend) {
376 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 376 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
377 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 377 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
378 budget->dvb_frontend->ops->diseqc_send_master_cmd = budget_diseqc_send_master_cmd; 378 budget->dvb_frontend->ops.diseqc_send_master_cmd = budget_diseqc_send_master_cmd;
379 budget->dvb_frontend->ops->diseqc_send_burst = budget_diseqc_send_burst; 379 budget->dvb_frontend->ops.diseqc_send_burst = budget_diseqc_send_burst;
380 budget->dvb_frontend->ops->set_tone = budget_set_tone; 380 budget->dvb_frontend->ops.set_tone = budget_set_tone;
381 break; 381 break;
382 } 382 }
383 break; 383 break;
@@ -386,7 +386,7 @@ static void frontend_init(struct budget *budget)
386 386
387 budget->dvb_frontend = ves1820_attach(&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget)); 387 budget->dvb_frontend = ves1820_attach(&alps_tdbe2_config, &budget->i2c_adap, read_pwm(budget));
388 if (budget->dvb_frontend) { 388 if (budget->dvb_frontend) {
389 budget->dvb_frontend->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 389 budget->dvb_frontend->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
390 break; 390 break;
391 } 391 }
392 break; 392 break;
@@ -395,7 +395,7 @@ static void frontend_init(struct budget *budget)
395 395
396 budget->dvb_frontend = l64781_attach(&grundig_29504_401_config, &budget->i2c_adap); 396 budget->dvb_frontend = l64781_attach(&grundig_29504_401_config, &budget->i2c_adap);
397 if (budget->dvb_frontend) { 397 if (budget->dvb_frontend) {
398 budget->dvb_frontend->ops->tuner_ops.set_params = grundig_29504_401_tuner_set_params; 398 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_401_tuner_set_params;
399 break; 399 break;
400 } 400 }
401 break; 401 break;
@@ -403,26 +403,26 @@ static void frontend_init(struct budget *budget)
403 case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059)) 403 case 0x4f60: // Fujitsu Siemens Activy Budget-S PCI rev AL (stv0299/ALPS BSRU6(tsa5059))
404 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap); 404 budget->dvb_frontend = stv0299_attach(&alps_bsru6_config, &budget->i2c_adap);
405 if (budget->dvb_frontend) { 405 if (budget->dvb_frontend) {
406 budget->dvb_frontend->ops->tuner_ops.set_params = alps_bsru6_tuner_set_params; 406 budget->dvb_frontend->ops.tuner_ops.set_params = alps_bsru6_tuner_set_params;
407 budget->dvb_frontend->tuner_priv = &budget->i2c_adap; 407 budget->dvb_frontend->tuner_priv = &budget->i2c_adap;
408 budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; 408 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage;
409 budget->dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; 409 budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL;
410 } 410 }
411 break; 411 break;
412 412
413 case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522)) 413 case 0x4f61: // Fujitsu Siemens Activy Budget-S PCI rev GR (tda8083/Grundig 29504-451(tsa5522))
414 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap); 414 budget->dvb_frontend = tda8083_attach(&grundig_29504_451_config, &budget->i2c_adap);
415 if (budget->dvb_frontend) { 415 if (budget->dvb_frontend) {
416 budget->dvb_frontend->ops->tuner_ops.set_params = grundig_29504_451_tuner_set_params; 416 budget->dvb_frontend->ops.tuner_ops.set_params = grundig_29504_451_tuner_set_params;
417 budget->dvb_frontend->ops->set_voltage = siemens_budget_set_voltage; 417 budget->dvb_frontend->ops.set_voltage = siemens_budget_set_voltage;
418 budget->dvb_frontend->ops->dishnetwork_send_legacy_command = NULL; 418 budget->dvb_frontend->ops.dishnetwork_send_legacy_command = NULL;
419 } 419 }
420 break; 420 break;
421 421
422 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260)) 422 case 0x1016: // Hauppauge/TT Nova-S SE (samsung s5h1420/????(tda8260))
423 budget->dvb_frontend = s5h1420_attach(&s5h1420_config, &budget->i2c_adap); 423 budget->dvb_frontend = s5h1420_attach(&s5h1420_config, &budget->i2c_adap);
424 if (budget->dvb_frontend) { 424 if (budget->dvb_frontend) {
425 budget->dvb_frontend->ops->tuner_ops.set_params = s5h1420_tuner_set_params; 425 budget->dvb_frontend->ops.tuner_ops.set_params = s5h1420_tuner_set_params;
426 if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0)) { 426 if (lnbp21_attach(budget->dvb_frontend, &budget->i2c_adap, 0, 0)) {
427 printk("%s: No LNBP21 found!\n", __FUNCTION__); 427 printk("%s: No LNBP21 found!\n", __FUNCTION__);
428 goto error_out; 428 goto error_out;
@@ -445,8 +445,8 @@ static void frontend_init(struct budget *budget)
445 445
446error_out: 446error_out:
447 printk("budget: Frontend registration failed!\n"); 447 printk("budget: Frontend registration failed!\n");
448 if (budget->dvb_frontend->ops->release) 448 if (budget->dvb_frontend->ops.release)
449 budget->dvb_frontend->ops->release(budget->dvb_frontend); 449 budget->dvb_frontend->ops.release(budget->dvb_frontend);
450 budget->dvb_frontend = NULL; 450 budget->dvb_frontend = NULL;
451 return; 451 return;
452} 452}
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index e540dacf5ce2..14559ef6153c 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -1039,8 +1039,8 @@ static int alps_tdmb7_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1039 data[2] = ((div >> 10) & 0x60) | 0x85; 1039 data[2] = ((div >> 10) & 0x60) | 0x85;
1040 data[3] = params->frequency < 592000000 ? 0x40 : 0x80; 1040 data[3] = params->frequency < 592000000 ? 0x40 : 0x80;
1041 1041
1042 if (fe->ops->i2c_gate_ctrl) 1042 if (fe->ops.i2c_gate_ctrl)
1043 fe->ops->i2c_gate_ctrl(fe, 1); 1043 fe->ops.i2c_gate_ctrl(fe, 1);
1044 if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) return -EIO; 1044 if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) return -EIO;
1045 return 0; 1045 return 0;
1046} 1046}
@@ -1061,8 +1061,8 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend* fe)
1061 struct i2c_msg tuner_msg = { .addr=0x60, .flags=0, .buf=td1316_init, .len=sizeof(td1316_init) }; 1061 struct i2c_msg tuner_msg = { .addr=0x60, .flags=0, .buf=td1316_init, .len=sizeof(td1316_init) };
1062 1062
1063 // setup PLL configuration 1063 // setup PLL configuration
1064 if (fe->ops->i2c_gate_ctrl) 1064 if (fe->ops.i2c_gate_ctrl)
1065 fe->ops->i2c_gate_ctrl(fe, 1); 1065 fe->ops.i2c_gate_ctrl(fe, 1);
1066 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) return -EIO; 1066 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) return -EIO;
1067 msleep(1); 1067 msleep(1);
1068 1068
@@ -1070,8 +1070,8 @@ static int philips_tdm1316l_tuner_init(struct dvb_frontend* fe)
1070 tuner_msg.addr = 0x65; 1070 tuner_msg.addr = 0x65;
1071 tuner_msg.buf = disable_mc44BC374c; 1071 tuner_msg.buf = disable_mc44BC374c;
1072 tuner_msg.len = sizeof(disable_mc44BC374c); 1072 tuner_msg.len = sizeof(disable_mc44BC374c);
1073 if (fe->ops->i2c_gate_ctrl) 1073 if (fe->ops.i2c_gate_ctrl)
1074 fe->ops->i2c_gate_ctrl(fe, 1); 1074 fe->ops.i2c_gate_ctrl(fe, 1);
1075 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { 1075 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) {
1076 i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1); 1076 i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1);
1077 } 1077 }
@@ -1139,8 +1139,8 @@ static int philips_tdm1316l_tuner_set_params(struct dvb_frontend* fe, struct dvb
1139 tuner_buf[2] = 0xca; 1139 tuner_buf[2] = 0xca;
1140 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 1140 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
1141 1141
1142 if (fe->ops->i2c_gate_ctrl) 1142 if (fe->ops.i2c_gate_ctrl)
1143 fe->ops->i2c_gate_ctrl(fe, 1); 1143 fe->ops.i2c_gate_ctrl(fe, 1);
1144 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) 1144 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1)
1145 return -EIO; 1145 return -EIO;
1146 1146
@@ -1304,8 +1304,8 @@ static int philips_tsa5059_tuner_set_params(struct dvb_frontend *fe, struct dvb_
1304 if (ttusb->revision == TTUSB_REV_2_2) 1304 if (ttusb->revision == TTUSB_REV_2_2)
1305 buf[3] |= 0x20; 1305 buf[3] |= 0x20;
1306 1306
1307 if (fe->ops->i2c_gate_ctrl) 1307 if (fe->ops.i2c_gate_ctrl)
1308 fe->ops->i2c_gate_ctrl(fe, 1); 1308 fe->ops.i2c_gate_ctrl(fe, 1);
1309 if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) 1309 if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1)
1310 return -EIO; 1310 return -EIO;
1311 1311
@@ -1338,8 +1338,8 @@ static int ttusb_novas_grundig_29504_491_tuner_set_params(struct dvb_frontend *f
1338 buf[2] = 0x8e; 1338 buf[2] = 0x8e;
1339 buf[3] = 0x00; 1339 buf[3] = 0x00;
1340 1340
1341 if (fe->ops->i2c_gate_ctrl) 1341 if (fe->ops.i2c_gate_ctrl)
1342 fe->ops->i2c_gate_ctrl(fe, 1); 1342 fe->ops.i2c_gate_ctrl(fe, 1);
1343 if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1) 1343 if (i2c_transfer(&ttusb->i2c_adap, &msg, 1) != 1)
1344 return -EIO; 1344 return -EIO;
1345 1345
@@ -1365,8 +1365,8 @@ static int alps_tdbe2_tuner_set_params(struct dvb_frontend* fe, struct dvb_front
1365 data[2] = 0x85 | ((div >> 10) & 0x60); 1365 data[2] = 0x85 | ((div >> 10) & 0x60);
1366 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81); 1366 data[3] = (params->frequency < 174000000 ? 0x88 : params->frequency < 470000000 ? 0x84 : 0x81);
1367 1367
1368 if (fe->ops->i2c_gate_ctrl) 1368 if (fe->ops.i2c_gate_ctrl)
1369 fe->ops->i2c_gate_ctrl(fe, 1); 1369 fe->ops.i2c_gate_ctrl(fe, 1);
1370 if (i2c_transfer (&ttusb->i2c_adap, &msg, 1) != 1) 1370 if (i2c_transfer (&ttusb->i2c_adap, &msg, 1) != 1)
1371 return -EIO; 1371 return -EIO;
1372 1372
@@ -1434,8 +1434,8 @@ static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struc
1434 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 1434 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
1435 tuner_buf[4] = 0x80; 1435 tuner_buf[4] = 0x80;
1436 1436
1437 if (fe->ops->i2c_gate_ctrl) 1437 if (fe->ops.i2c_gate_ctrl)
1438 fe->ops->i2c_gate_ctrl(fe, 1); 1438 fe->ops.i2c_gate_ctrl(fe, 1);
1439 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { 1439 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) {
1440 printk("dvb-ttusb-budget: dvbc_philips_tdm1316l_pll_set Error 1\n"); 1440 printk("dvb-ttusb-budget: dvbc_philips_tdm1316l_pll_set Error 1\n");
1441 return -EIO; 1441 return -EIO;
@@ -1443,8 +1443,8 @@ static int dvbc_philips_tdm1316l_tuner_set_params(struct dvb_frontend *fe, struc
1443 1443
1444 msleep(50); 1444 msleep(50);
1445 1445
1446 if (fe->ops->i2c_gate_ctrl) 1446 if (fe->ops.i2c_gate_ctrl)
1447 fe->ops->i2c_gate_ctrl(fe, 1); 1447 fe->ops.i2c_gate_ctrl(fe, 1);
1448 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) { 1448 if (i2c_transfer(&ttusb->i2c_adap, &tuner_msg, 1) != 1) {
1449 printk("dvb-ttusb-budget: dvbc_philips_tdm1316l_pll_set Error 2\n"); 1449 printk("dvb-ttusb-budget: dvbc_philips_tdm1316l_pll_set Error 2\n");
1450 return -EIO; 1450 return -EIO;
@@ -1570,13 +1570,13 @@ static void frontend_init(struct ttusb* ttusb)
1570 // try the stv0299 based first 1570 // try the stv0299 based first
1571 ttusb->fe = stv0299_attach(&alps_stv0299_config, &ttusb->i2c_adap); 1571 ttusb->fe = stv0299_attach(&alps_stv0299_config, &ttusb->i2c_adap);
1572 if (ttusb->fe != NULL) { 1572 if (ttusb->fe != NULL) {
1573 ttusb->fe->ops->tuner_ops.set_params = philips_tsa5059_tuner_set_params; 1573 ttusb->fe->ops.tuner_ops.set_params = philips_tsa5059_tuner_set_params;
1574 1574
1575 if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1 1575 if(ttusb->revision == TTUSB_REV_2_2) { // ALPS BSBE1
1576 alps_stv0299_config.inittab = alps_bsbe1_inittab; 1576 alps_stv0299_config.inittab = alps_bsbe1_inittab;
1577 lnbp21_attach(ttusb->fe, &ttusb->i2c_adap, 0, 0); 1577 lnbp21_attach(ttusb->fe, &ttusb->i2c_adap, 0, 0);
1578 } else { // ALPS BSRU6 1578 } else { // ALPS BSRU6
1579 ttusb->fe->ops->set_voltage = ttusb_set_voltage; 1579 ttusb->fe->ops.set_voltage = ttusb_set_voltage;
1580 } 1580 }
1581 break; 1581 break;
1582 } 1582 }
@@ -1584,8 +1584,8 @@ static void frontend_init(struct ttusb* ttusb)
1584 // Grundig 29504-491 1584 // Grundig 29504-491
1585 ttusb->fe = tda8083_attach(&ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap); 1585 ttusb->fe = tda8083_attach(&ttusb_novas_grundig_29504_491_config, &ttusb->i2c_adap);
1586 if (ttusb->fe != NULL) { 1586 if (ttusb->fe != NULL) {
1587 ttusb->fe->ops->tuner_ops.set_params = ttusb_novas_grundig_29504_491_tuner_set_params; 1587 ttusb->fe->ops.tuner_ops.set_params = ttusb_novas_grundig_29504_491_tuner_set_params;
1588 ttusb->fe->ops->set_voltage = ttusb_set_voltage; 1588 ttusb->fe->ops.set_voltage = ttusb_set_voltage;
1589 break; 1589 break;
1590 } 1590 }
1591 break; 1591 break;
@@ -1593,13 +1593,13 @@ static void frontend_init(struct ttusb* ttusb)
1593 case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659)) 1593 case 0x1004: // Hauppauge/TT DVB-C budget (ves1820/ALPS TDBE2(sp5659))
1594 ttusb->fe = ves1820_attach(&alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb)); 1594 ttusb->fe = ves1820_attach(&alps_tdbe2_config, &ttusb->i2c_adap, read_pwm(ttusb));
1595 if (ttusb->fe != NULL) { 1595 if (ttusb->fe != NULL) {
1596 ttusb->fe->ops->tuner_ops.set_params = alps_tdbe2_tuner_set_params; 1596 ttusb->fe->ops.tuner_ops.set_params = alps_tdbe2_tuner_set_params;
1597 break; 1597 break;
1598 } 1598 }
1599 1599
1600 ttusb->fe = stv0297_attach(&dvbc_philips_tdm1316l_config, &ttusb->i2c_adap); 1600 ttusb->fe = stv0297_attach(&dvbc_philips_tdm1316l_config, &ttusb->i2c_adap);
1601 if (ttusb->fe != NULL) { 1601 if (ttusb->fe != NULL) {
1602 ttusb->fe->ops->tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params; 1602 ttusb->fe->ops.tuner_ops.set_params = dvbc_philips_tdm1316l_tuner_set_params;
1603 break; 1603 break;
1604 } 1604 }
1605 break; 1605 break;
@@ -1608,15 +1608,15 @@ static void frontend_init(struct ttusb* ttusb)
1608 // try the ALPS TDMB7 first 1608 // try the ALPS TDMB7 first
1609 ttusb->fe = cx22700_attach(&alps_tdmb7_config, &ttusb->i2c_adap); 1609 ttusb->fe = cx22700_attach(&alps_tdmb7_config, &ttusb->i2c_adap);
1610 if (ttusb->fe != NULL) { 1610 if (ttusb->fe != NULL) {
1611 ttusb->fe->ops->tuner_ops.set_params = alps_tdmb7_tuner_set_params; 1611 ttusb->fe->ops.tuner_ops.set_params = alps_tdmb7_tuner_set_params;
1612 break; 1612 break;
1613 } 1613 }
1614 1614
1615 // Philips td1316 1615 // Philips td1316
1616 ttusb->fe = tda10046_attach(&philips_tdm1316l_config, &ttusb->i2c_adap); 1616 ttusb->fe = tda10046_attach(&philips_tdm1316l_config, &ttusb->i2c_adap);
1617 if (ttusb->fe != NULL) { 1617 if (ttusb->fe != NULL) {
1618 ttusb->fe->ops->tuner_ops.init = philips_tdm1316l_tuner_init; 1618 ttusb->fe->ops.tuner_ops.init = philips_tdm1316l_tuner_init;
1619 ttusb->fe->ops->tuner_ops.set_params = philips_tdm1316l_tuner_set_params; 1619 ttusb->fe->ops.tuner_ops.set_params = philips_tdm1316l_tuner_set_params;
1620 break; 1620 break;
1621 } 1621 }
1622 break; 1622 break;
@@ -1629,8 +1629,8 @@ static void frontend_init(struct ttusb* ttusb)
1629 } else { 1629 } else {
1630 if (dvb_register_frontend(&ttusb->adapter, ttusb->fe)) { 1630 if (dvb_register_frontend(&ttusb->adapter, ttusb->fe)) {
1631 printk("dvb-ttusb-budget: Frontend registration failed!\n"); 1631 printk("dvb-ttusb-budget: Frontend registration failed!\n");
1632 if (ttusb->fe->ops->release) 1632 if (ttusb->fe->ops.release)
1633 ttusb->fe->ops->release(ttusb->fe); 1633 ttusb->fe->ops.release(ttusb->fe);
1634 ttusb->fe = NULL; 1634 ttusb->fe = NULL;
1635 } 1635 }
1636 } 1636 }
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
index da1090afad54..6c1cb770bcf5 100644
--- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c
+++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c
@@ -1657,8 +1657,8 @@ static int ttusb_dec_probe(struct usb_interface *intf,
1657 } else { 1657 } else {
1658 if (dvb_register_frontend(&dec->adapter, dec->fe)) { 1658 if (dvb_register_frontend(&dec->adapter, dec->fe)) {
1659 printk("budget-ci: Frontend registration failed!\n"); 1659 printk("budget-ci: Frontend registration failed!\n");
1660 if (dec->fe->ops->release) 1660 if (dec->fe->ops.release)
1661 dec->fe->ops->release(dec->fe); 1661 dec->fe->ops.release(dec->fe);
1662 dec->fe = NULL; 1662 dec->fe = NULL;
1663 } 1663 }
1664 } 1664 }
diff --git a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
index a5a46175fa09..42f39a89bc4d 100644
--- a/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
+++ b/drivers/media/dvb/ttusb-dec/ttusbdecfe.c
@@ -28,8 +28,6 @@
28 28
29struct ttusbdecfe_state { 29struct ttusbdecfe_state {
30 30
31 struct dvb_frontend_ops ops;
32
33 /* configuration settings */ 31 /* configuration settings */
34 const struct ttusbdecfe_config* config; 32 const struct ttusbdecfe_config* config;
35 33
@@ -203,10 +201,9 @@ struct dvb_frontend* ttusbdecfe_dvbt_attach(const struct ttusbdecfe_config* conf
203 201
204 /* setup the state */ 202 /* setup the state */
205 state->config = config; 203 state->config = config;
206 memcpy(&state->ops, &ttusbdecfe_dvbt_ops, sizeof(struct dvb_frontend_ops));
207 204
208 /* create dvb_frontend */ 205 /* create dvb_frontend */
209 state->frontend.ops = &state->ops; 206 memcpy(&state->frontend.ops, &ttusbdecfe_dvbt_ops, sizeof(struct dvb_frontend_ops));
210 state->frontend.demodulator_priv = state; 207 state->frontend.demodulator_priv = state;
211 return &state->frontend; 208 return &state->frontend;
212} 209}
@@ -226,10 +223,9 @@ struct dvb_frontend* ttusbdecfe_dvbs_attach(const struct ttusbdecfe_config* conf
226 state->config = config; 223 state->config = config;
227 state->voltage = 0; 224 state->voltage = 0;
228 state->hi_band = 0; 225 state->hi_band = 0;
229 memcpy(&state->ops, &ttusbdecfe_dvbs_ops, sizeof(struct dvb_frontend_ops));
230 226
231 /* create dvb_frontend */ 227 /* create dvb_frontend */
232 state->frontend.ops = &state->ops; 228 memcpy(&state->frontend.ops, &ttusbdecfe_dvbs_ops, sizeof(struct dvb_frontend_ops));
233 state->frontend.demodulator_priv = state; 229 state->frontend.demodulator_priv = state;
234 return &state->frontend; 230 return &state->frontend;
235} 231}
diff --git a/drivers/media/video/cx88/cx88-dvb.c b/drivers/media/video/cx88/cx88-dvb.c
index 4d369f8393d9..bf89cbf2b058 100644
--- a/drivers/media/video/cx88/cx88-dvb.c
+++ b/drivers/media/video/cx88/cx88-dvb.c
@@ -230,8 +230,8 @@ static int philips_fmd1216_pll_init(struct dvb_frontend *fe)
230 .buf = fmd1216_init, .len = sizeof(fmd1216_init) }; 230 .buf = fmd1216_init, .len = sizeof(fmd1216_init) };
231 int err; 231 int err;
232 232
233 if (fe->ops->i2c_gate_ctrl) 233 if (fe->ops.i2c_gate_ctrl)
234 fe->ops->i2c_gate_ctrl(fe, 1); 234 fe->ops.i2c_gate_ctrl(fe, 1);
235 if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { 235 if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
236 if (err < 0) 236 if (err < 0)
237 return err; 237 return err;
@@ -261,8 +261,8 @@ static int dntv_live_dvbt_pro_tuner_set_params(struct dvb_frontend* fe,
261 dvb_pll_configure(dev->core->pll_desc, buf, 261 dvb_pll_configure(dev->core->pll_desc, buf,
262 params->frequency, 262 params->frequency,
263 params->u.ofdm.bandwidth); 263 params->u.ofdm.bandwidth);
264 if (fe->ops->i2c_gate_ctrl) 264 if (fe->ops.i2c_gate_ctrl)
265 fe->ops->i2c_gate_ctrl(fe, 1); 265 fe->ops.i2c_gate_ctrl(fe, 1);
266 if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { 266 if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
267 267
268 printk(KERN_WARNING "cx88-dvb: %s error " 268 printk(KERN_WARNING "cx88-dvb: %s error "
@@ -300,8 +300,8 @@ static int dvico_hybrid_tuner_set_params(struct dvb_frontend *fe,
300 params->frequency, 300 params->frequency,
301 params->u.ofdm.bandwidth); 301 params->u.ofdm.bandwidth);
302 302
303 if (fe->ops->i2c_gate_ctrl) 303 if (fe->ops.i2c_gate_ctrl)
304 fe->ops->i2c_gate_ctrl(fe, 1); 304 fe->ops.i2c_gate_ctrl(fe, 1);
305 if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) { 305 if ((err = i2c_transfer(&dev->core->i2c_adap, &msg, 1)) != 1) {
306 printk(KERN_WARNING "cx88-dvb: %s error " 306 printk(KERN_WARNING "cx88-dvb: %s error "
307 "(addr %02x <- %02x, err = %i)\n", 307 "(addr %02x <- %02x, err = %i)\n",
@@ -375,8 +375,8 @@ static int lgdt3302_tuner_set_params(struct dvb_frontend* fe,
375 dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n", 375 dprintk(1, "%s: tuner at 0x%02x bytes: 0x%02x 0x%02x 0x%02x 0x%02x\n",
376 __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]); 376 __FUNCTION__, msg.addr, buf[0],buf[1],buf[2],buf[3]);
377 377
378 if (fe->ops->i2c_gate_ctrl) 378 if (fe->ops.i2c_gate_ctrl)
379 fe->ops->i2c_gate_ctrl(fe, 1); 379 fe->ops.i2c_gate_ctrl(fe, 1);
380 if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) { 380 if ((err = i2c_transfer(&core->i2c_adap, &msg, 1)) != 1) {
381 printk(KERN_WARNING "cx88-dvb: %s error " 381 printk(KERN_WARNING "cx88-dvb: %s error "
382 "(addr %02x <- %02x, err = %i)\n", 382 "(addr %02x <- %02x, err = %i)\n",
@@ -586,7 +586,7 @@ static int dvb_register(struct cx8802_dev *dev)
586 dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_pro_config, 586 dev->dvb.frontend = mt352_attach(&dntv_live_dvbt_pro_config,
587 &((struct vp3054_i2c_state *)dev->card_priv)->adap); 587 &((struct vp3054_i2c_state *)dev->card_priv)->adap);
588 if (dev->dvb.frontend != NULL) { 588 if (dev->dvb.frontend != NULL) {
589 dev->dvb.frontend->ops->tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params; 589 dev->dvb.frontend->ops.tuner_ops.set_params = dntv_live_dvbt_pro_tuner_set_params;
590 } 590 }
591#else 591#else
592 printk("%s: built without vp3054 support\n", dev->core->name); 592 printk("%s: built without vp3054 support\n", dev->core->name);
@@ -609,7 +609,7 @@ static int dvb_register(struct cx8802_dev *dev)
609 dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_hybrid, 609 dev->dvb.frontend = zl10353_attach(&dvico_fusionhdtv_hybrid,
610 &dev->core->i2c_adap); 610 &dev->core->i2c_adap);
611 if (dev->dvb.frontend != NULL) { 611 if (dev->dvb.frontend != NULL) {
612 dev->dvb.frontend->ops->tuner_ops.set_params = dvico_hybrid_tuner_set_params; 612 dev->dvb.frontend->ops.tuner_ops.set_params = dvico_hybrid_tuner_set_params;
613 } 613 }
614 break; 614 break;
615#endif 615#endif
@@ -641,7 +641,7 @@ static int dvb_register(struct cx8802_dev *dev)
641 dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, 641 dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold,
642 &dev->core->i2c_adap); 642 &dev->core->i2c_adap);
643 if (dev->dvb.frontend != NULL) { 643 if (dev->dvb.frontend != NULL) {
644 dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3302_tuner_set_params; 644 dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params;
645 } 645 }
646 } 646 }
647 break; 647 break;
@@ -660,7 +660,7 @@ static int dvb_register(struct cx8802_dev *dev)
660 dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold, 660 dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_3_gold,
661 &dev->core->i2c_adap); 661 &dev->core->i2c_adap);
662 if (dev->dvb.frontend != NULL) { 662 if (dev->dvb.frontend != NULL) {
663 dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3302_tuner_set_params; 663 dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3302_tuner_set_params;
664 } 664 }
665 } 665 }
666 break; 666 break;
@@ -677,7 +677,7 @@ static int dvb_register(struct cx8802_dev *dev)
677 dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold, 677 dev->dvb.frontend = lgdt330x_attach(&fusionhdtv_5_gold,
678 &dev->core->i2c_adap); 678 &dev->core->i2c_adap);
679 if (dev->dvb.frontend != NULL) { 679 if (dev->dvb.frontend != NULL) {
680 dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3303_tuner_set_params; 680 dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params;
681 } 681 }
682 } 682 }
683 break; 683 break;
@@ -694,7 +694,7 @@ static int dvb_register(struct cx8802_dev *dev)
694 dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500, 694 dev->dvb.frontend = lgdt330x_attach(&pchdtv_hd5500,
695 &dev->core->i2c_adap); 695 &dev->core->i2c_adap);
696 if (dev->dvb.frontend != NULL) { 696 if (dev->dvb.frontend != NULL) {
697 dev->dvb.frontend->ops->tuner_ops.set_params = lgdt3303_tuner_set_params; 697 dev->dvb.frontend->ops.tuner_ops.set_params = lgdt3303_tuner_set_params;
698 } 698 }
699 } 699 }
700 break; 700 break;
@@ -721,8 +721,8 @@ static int dvb_register(struct cx8802_dev *dev)
721 dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config, 721 dev->dvb.frontend = cx24123_attach(&kworld_dvbs_100_config,
722 &dev->core->i2c_adap); 722 &dev->core->i2c_adap);
723 if (dev->dvb.frontend) { 723 if (dev->dvb.frontend) {
724 dev->core->prev_set_voltage = dev->dvb.frontend->ops->set_voltage; 724 dev->core->prev_set_voltage = dev->dvb.frontend->ops.set_voltage;
725 dev->dvb.frontend->ops->set_voltage = kworld_dvbs_100_set_voltage; 725 dev->dvb.frontend->ops.set_voltage = kworld_dvbs_100_set_voltage;
726 } 726 }
727 break; 727 break;
728#endif 728#endif
@@ -737,8 +737,8 @@ static int dvb_register(struct cx8802_dev *dev)
737 } 737 }
738 738
739 if (dev->core->pll_desc) { 739 if (dev->core->pll_desc) {
740 dev->dvb.frontend->ops->info.frequency_min = dev->core->pll_desc->min; 740 dev->dvb.frontend->ops.info.frequency_min = dev->core->pll_desc->min;
741 dev->dvb.frontend->ops->info.frequency_max = dev->core->pll_desc->max; 741 dev->dvb.frontend->ops.info.frequency_max = dev->core->pll_desc->max;
742 } 742 }
743 743
744 /* Put the analog decoder in standby to keep it quiet */ 744 /* Put the analog decoder in standby to keep it quiet */
diff --git a/drivers/media/video/cx88/cx88-i2c.c b/drivers/media/video/cx88/cx88-i2c.c
index f720901e9638..7efa6def0bde 100644
--- a/drivers/media/video/cx88/cx88-i2c.c
+++ b/drivers/media/video/cx88/cx88-i2c.c
@@ -138,13 +138,13 @@ void cx88_call_i2c_clients(struct cx88_core *core, unsigned int cmd, void *arg)
138 return; 138 return;
139 139
140 if (core->dvbdev) { 140 if (core->dvbdev) {
141 if (core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl) 141 if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl)
142 core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl(core->dvbdev->dvb.frontend, 1); 142 core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 1);
143 143
144 i2c_clients_command(&core->i2c_adap, cmd, arg); 144 i2c_clients_command(&core->i2c_adap, cmd, arg);
145 145
146 if (core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl) 146 if (core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl)
147 core->dvbdev->dvb.frontend->ops->i2c_gate_ctrl(core->dvbdev->dvb.frontend, 0); 147 core->dvbdev->dvb.frontend->ops.i2c_gate_ctrl(core->dvbdev->dvb.frontend, 0);
148 } else 148 } else
149 i2c_clients_command(&core->i2c_adap, cmd, arg); 149 i2c_clients_command(&core->i2c_adap, cmd, arg);
150} 150}
diff --git a/drivers/media/video/saa7134/saa7134-dvb.c b/drivers/media/video/saa7134/saa7134-dvb.c
index 716b829c460f..279828b8f299 100644
--- a/drivers/media/video/saa7134/saa7134-dvb.c
+++ b/drivers/media/video/saa7134/saa7134-dvb.c
@@ -146,13 +146,13 @@ static int mt352_pinnacle_tuner_set_params(struct dvb_frontend* fe,
146 f.tuner = 0; 146 f.tuner = 0;
147 f.type = V4L2_TUNER_DIGITAL_TV; 147 f.type = V4L2_TUNER_DIGITAL_TV;
148 f.frequency = params->frequency / 1000 * 16 / 1000; 148 f.frequency = params->frequency / 1000 * 16 / 1000;
149 if (fe->ops->i2c_gate_ctrl) 149 if (fe->ops.i2c_gate_ctrl)
150 fe->ops->i2c_gate_ctrl(fe, 1); 150 fe->ops.i2c_gate_ctrl(fe, 1);
151 i2c_transfer(&dev->i2c_adap, &msg, 1); 151 i2c_transfer(&dev->i2c_adap, &msg, 1);
152 saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f); 152 saa7134_i2c_call_clients(dev,VIDIOC_S_FREQUENCY,&f);
153 msg.buf = on; 153 msg.buf = on;
154 if (fe->ops->i2c_gate_ctrl) 154 if (fe->ops.i2c_gate_ctrl)
155 fe->ops->i2c_gate_ctrl(fe, 1); 155 fe->ops.i2c_gate_ctrl(fe, 1);
156 i2c_transfer(&dev->i2c_adap, &msg, 1); 156 i2c_transfer(&dev->i2c_adap, &msg, 1);
157 157
158 pinnacle_antenna_pwr(dev, antenna_pwr); 158 pinnacle_antenna_pwr(dev, antenna_pwr);
@@ -266,8 +266,8 @@ static int philips_tda6651_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb_
266 tuner_buf[2] = 0xca; 266 tuner_buf[2] = 0xca;
267 tuner_buf[3] = (cp << 5) | (filter << 3) | band; 267 tuner_buf[3] = (cp << 5) | (filter << 3) | band;
268 268
269 if (fe->ops->i2c_gate_ctrl) 269 if (fe->ops.i2c_gate_ctrl)
270 fe->ops->i2c_gate_ctrl(fe, 1); 270 fe->ops.i2c_gate_ctrl(fe, 1);
271 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) 271 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1)
272 return -EIO; 272 return -EIO;
273 msleep(1); 273 msleep(1);
@@ -281,8 +281,8 @@ static int philips_tda6651_pll_init(u8 addr, struct dvb_frontend *fe)
281 struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) }; 281 struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tu1216_init,.len = sizeof(tu1216_init) };
282 282
283 /* setup PLL configuration */ 283 /* setup PLL configuration */
284 if (fe->ops->i2c_gate_ctrl) 284 if (fe->ops.i2c_gate_ctrl)
285 fe->ops->i2c_gate_ctrl(fe, 1); 285 fe->ops.i2c_gate_ctrl(fe, 1);
286 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) 286 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1)
287 return -EIO; 287 return -EIO;
288 msleep(1); 288 msleep(1);
@@ -352,8 +352,8 @@ static int philips_europa_tuner_init(struct dvb_frontend *fe)
352 struct i2c_msg init_msg = {.addr = 0x61,.flags = 0,.buf = msg,.len = sizeof(msg) }; 352 struct i2c_msg init_msg = {.addr = 0x61,.flags = 0,.buf = msg,.len = sizeof(msg) };
353 353
354 /* setup PLL configuration */ 354 /* setup PLL configuration */
355 if (fe->ops->i2c_gate_ctrl) 355 if (fe->ops.i2c_gate_ctrl)
356 fe->ops->i2c_gate_ctrl(fe, 1); 356 fe->ops.i2c_gate_ctrl(fe, 1);
357 if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) 357 if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1)
358 return -EIO; 358 return -EIO;
359 msleep(1); 359 msleep(1);
@@ -363,8 +363,8 @@ static int philips_europa_tuner_init(struct dvb_frontend *fe)
363 init_msg.len = 0x02; 363 init_msg.len = 0x02;
364 msg[0] = 0x00; 364 msg[0] = 0x00;
365 msg[1] = 0x40; 365 msg[1] = 0x40;
366 if (fe->ops->i2c_gate_ctrl) 366 if (fe->ops.i2c_gate_ctrl)
367 fe->ops->i2c_gate_ctrl(fe, 1); 367 fe->ops.i2c_gate_ctrl(fe, 1);
368 if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1) 368 if (i2c_transfer(&dev->i2c_adap, &init_msg, 1) != 1)
369 return -EIO; 369 return -EIO;
370 370
@@ -391,8 +391,8 @@ static int philips_europa_tuner_sleep(struct dvb_frontend *fe)
391 analog_msg.len = 0x02; 391 analog_msg.len = 0x02;
392 msg[0] = 0x00; 392 msg[0] = 0x00;
393 msg[1] = 0x14; 393 msg[1] = 0x14;
394 if (fe->ops->i2c_gate_ctrl) 394 if (fe->ops.i2c_gate_ctrl)
395 fe->ops->i2c_gate_ctrl(fe, 1); 395 fe->ops.i2c_gate_ctrl(fe, 1);
396 i2c_transfer(&dev->i2c_adap, &analog_msg, 1); 396 i2c_transfer(&dev->i2c_adap, &analog_msg, 1);
397 return 0; 397 return 0;
398} 398}
@@ -403,7 +403,7 @@ static int philips_europa_demod_sleep(struct dvb_frontend *fe)
403 403
404 if (dev->original_demod_sleep) 404 if (dev->original_demod_sleep)
405 dev->original_demod_sleep(fe); 405 dev->original_demod_sleep(fe);
406 fe->ops->i2c_gate_ctrl(fe, 1); 406 fe->ops.i2c_gate_ctrl(fe, 1);
407 return 0; 407 return 0;
408} 408}
409 409
@@ -427,8 +427,8 @@ static int philips_fmd1216_tuner_init(struct dvb_frontend *fe)
427 static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0xa0 }; 427 static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0xa0 };
428 struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; 428 struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) };
429 429
430 if (fe->ops->i2c_gate_ctrl) 430 if (fe->ops.i2c_gate_ctrl)
431 fe->ops->i2c_gate_ctrl(fe, 1); 431 fe->ops.i2c_gate_ctrl(fe, 1);
432 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) 432 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1)
433 return -EIO; 433 return -EIO;
434 msleep(1); 434 msleep(1);
@@ -443,14 +443,14 @@ static int philips_fmd1216_tuner_sleep(struct dvb_frontend *fe)
443 static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0x60 }; 443 static u8 fmd1216_init[] = { 0x0b, 0xdc, 0x9c, 0x60 };
444 struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) }; 444 struct i2c_msg tuner_msg = {.addr = 0x61,.flags = 0,.buf = fmd1216_init,.len = sizeof(fmd1216_init) };
445 445
446 if (fe->ops->i2c_gate_ctrl) 446 if (fe->ops.i2c_gate_ctrl)
447 fe->ops->i2c_gate_ctrl(fe, 1); 447 fe->ops.i2c_gate_ctrl(fe, 1);
448 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); 448 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
449 msleep(1); 449 msleep(1);
450 fmd1216_init[2] = 0x86; 450 fmd1216_init[2] = 0x86;
451 fmd1216_init[3] = 0x54; 451 fmd1216_init[3] = 0x54;
452 if (fe->ops->i2c_gate_ctrl) 452 if (fe->ops.i2c_gate_ctrl)
453 fe->ops->i2c_gate_ctrl(fe, 1); 453 fe->ops.i2c_gate_ctrl(fe, 1);
454 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); 454 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
455 msleep(1); 455 msleep(1);
456 return 0; 456 return 0;
@@ -533,8 +533,8 @@ static int philips_fmd1216_tuner_set_params(struct dvb_frontend *fe, struct dvb_
533 tuner_buf[2] = 0x80 | (cp << 6) | (mode << 3) | 4; 533 tuner_buf[2] = 0x80 | (cp << 6) | (mode << 3) | 4;
534 tuner_buf[3] = 0x40 | band; 534 tuner_buf[3] = 0x40 | band;
535 535
536 if (fe->ops->i2c_gate_ctrl) 536 if (fe->ops.i2c_gate_ctrl)
537 fe->ops->i2c_gate_ctrl(fe, 1); 537 fe->ops.i2c_gate_ctrl(fe, 1);
538 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) 538 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1)
539 return -EIO; 539 return -EIO;
540 return 0; 540 return 0;
@@ -646,8 +646,8 @@ static int philips_tda827x_tuner_set_params(struct dvb_frontend *fe, struct dvb_
646 tuner_buf[13] = 0x40; 646 tuner_buf[13] = 0x40;
647 647
648 tuner_msg.len = 14; 648 tuner_msg.len = 14;
649 if (fe->ops->i2c_gate_ctrl) 649 if (fe->ops.i2c_gate_ctrl)
650 fe->ops->i2c_gate_ctrl(fe, 1); 650 fe->ops.i2c_gate_ctrl(fe, 1);
651 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1) 651 if (i2c_transfer(&dev->i2c_adap, &tuner_msg, 1) != 1)
652 return -EIO; 652 return -EIO;
653 653
@@ -656,8 +656,8 @@ static int philips_tda827x_tuner_set_params(struct dvb_frontend *fe, struct dvb_
656 tuner_buf[0] = 0x30; 656 tuner_buf[0] = 0x30;
657 tuner_buf[1] = 0x50 + tda827x_dvbt[i].cp; 657 tuner_buf[1] = 0x50 + tda827x_dvbt[i].cp;
658 tuner_msg.len = 2; 658 tuner_msg.len = 2;
659 if (fe->ops->i2c_gate_ctrl) 659 if (fe->ops.i2c_gate_ctrl)
660 fe->ops->i2c_gate_ctrl(fe, 1); 660 fe->ops.i2c_gate_ctrl(fe, 1);
661 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); 661 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
662 662
663 return 0; 663 return 0;
@@ -669,8 +669,8 @@ static int philips_tda827x_tuner_sleep(struct dvb_frontend *fe)
669 static u8 tda827x_sleep[] = { 0x30, 0xd0}; 669 static u8 tda827x_sleep[] = { 0x30, 0xd0};
670 struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep, 670 struct i2c_msg tuner_msg = {.addr = 0x60,.flags = 0,.buf = tda827x_sleep,
671 .len = sizeof(tda827x_sleep) }; 671 .len = sizeof(tda827x_sleep) };
672 if (fe->ops->i2c_gate_ctrl) 672 if (fe->ops.i2c_gate_ctrl)
673 fe->ops->i2c_gate_ctrl(fe, 1); 673 fe->ops.i2c_gate_ctrl(fe, 1);
674 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); 674 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
675 return 0; 675 return 0;
676} 676}
@@ -773,8 +773,8 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb
773 tuner_buf[12] = 0x00; 773 tuner_buf[12] = 0x00;
774 tuner_buf[13] = 0x39; // lpsel 774 tuner_buf[13] = 0x39; // lpsel
775 msg.len = 14; 775 msg.len = 14;
776 if (fe->ops->i2c_gate_ctrl) 776 if (fe->ops.i2c_gate_ctrl)
777 fe->ops->i2c_gate_ctrl(fe, 1); 777 fe->ops.i2c_gate_ctrl(fe, 1);
778 if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1) 778 if (i2c_transfer(&dev->i2c_adap, &msg, 1) != 1)
779 return -EIO; 779 return -EIO;
780 780
@@ -782,14 +782,14 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb
782 msg.len = 2; 782 msg.len = 2;
783 reg2[0] = 0x60; 783 reg2[0] = 0x60;
784 reg2[1] = 0x3c; 784 reg2[1] = 0x3c;
785 if (fe->ops->i2c_gate_ctrl) 785 if (fe->ops.i2c_gate_ctrl)
786 fe->ops->i2c_gate_ctrl(fe, 1); 786 fe->ops.i2c_gate_ctrl(fe, 1);
787 i2c_transfer(&dev->i2c_adap, &msg, 1); 787 i2c_transfer(&dev->i2c_adap, &msg, 1);
788 788
789 reg2[0] = 0xa0; 789 reg2[0] = 0xa0;
790 reg2[1] = 0x40; 790 reg2[1] = 0x40;
791 if (fe->ops->i2c_gate_ctrl) 791 if (fe->ops.i2c_gate_ctrl)
792 fe->ops->i2c_gate_ctrl(fe, 1); 792 fe->ops.i2c_gate_ctrl(fe, 1);
793 i2c_transfer(&dev->i2c_adap, &msg, 1); 793 i2c_transfer(&dev->i2c_adap, &msg, 1);
794 794
795 msleep(2); 795 msleep(2);
@@ -797,15 +797,15 @@ static int philips_tda827xa_pll_set(u8 addr, struct dvb_frontend *fe, struct dvb
797 reg2[0] = 0x30; 797 reg2[0] = 0x30;
798 reg2[1] = 0x10 + tda827xa_dvbt[i].scr; 798 reg2[1] = 0x10 + tda827xa_dvbt[i].scr;
799 msg.len = 2; 799 msg.len = 2;
800 if (fe->ops->i2c_gate_ctrl) 800 if (fe->ops.i2c_gate_ctrl)
801 fe->ops->i2c_gate_ctrl(fe, 1); 801 fe->ops.i2c_gate_ctrl(fe, 1);
802 i2c_transfer(&dev->i2c_adap, &msg, 1); 802 i2c_transfer(&dev->i2c_adap, &msg, 1);
803 803
804 msleep(550); 804 msleep(550);
805 reg2[0] = 0x50; 805 reg2[0] = 0x50;
806 reg2[1] = 0x4f + (tda827xa_dvbt[i].gc3 << 4); 806 reg2[1] = 0x4f + (tda827xa_dvbt[i].gc3 << 4);
807 if (fe->ops->i2c_gate_ctrl) 807 if (fe->ops.i2c_gate_ctrl)
808 fe->ops->i2c_gate_ctrl(fe, 1); 808 fe->ops.i2c_gate_ctrl(fe, 1);
809 i2c_transfer(&dev->i2c_adap, &msg, 1); 809 i2c_transfer(&dev->i2c_adap, &msg, 1);
810 810
811 return 0; 811 return 0;
@@ -818,8 +818,8 @@ static int philips_tda827xa_tuner_sleep(u8 addr, struct dvb_frontend *fe)
818 static u8 tda827xa_sleep[] = { 0x30, 0x90}; 818 static u8 tda827xa_sleep[] = { 0x30, 0x90};
819 struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tda827xa_sleep, 819 struct i2c_msg tuner_msg = {.addr = addr,.flags = 0,.buf = tda827xa_sleep,
820 .len = sizeof(tda827xa_sleep) }; 820 .len = sizeof(tda827xa_sleep) };
821 if (fe->ops->i2c_gate_ctrl) 821 if (fe->ops.i2c_gate_ctrl)
822 fe->ops->i2c_gate_ctrl(fe, 1); 822 fe->ops.i2c_gate_ctrl(fe, 1);
823 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1); 823 i2c_transfer(&dev->i2c_adap, &tuner_msg, 1);
824 return 0; 824 return 0;
825} 825}
@@ -1015,7 +1015,7 @@ static int dvb_init(struct saa7134_dev *dev)
1015 dev->dvb.frontend = mt352_attach(&pinnacle_300i, 1015 dev->dvb.frontend = mt352_attach(&pinnacle_300i,
1016 &dev->i2c_adap); 1016 &dev->i2c_adap);
1017 if (dev->dvb.frontend) { 1017 if (dev->dvb.frontend) {
1018 dev->dvb.frontend->ops->tuner_ops.set_params = mt352_pinnacle_tuner_set_params; 1018 dev->dvb.frontend->ops.tuner_ops.set_params = mt352_pinnacle_tuner_set_params;
1019 } 1019 }
1020 break; 1020 break;
1021 1021
@@ -1024,7 +1024,7 @@ static int dvb_init(struct saa7134_dev *dev)
1024 dev->dvb.frontend = mt352_attach(&avermedia_777, 1024 dev->dvb.frontend = mt352_attach(&avermedia_777,
1025 &dev->i2c_adap); 1025 &dev->i2c_adap);
1026 if (dev->dvb.frontend) { 1026 if (dev->dvb.frontend) {
1027 dev->dvb.frontend->ops->tuner_ops.calc_regs = mt352_aver777_tuner_calc_regs; 1027 dev->dvb.frontend->ops.tuner_ops.calc_regs = mt352_aver777_tuner_calc_regs;
1028 } 1028 }
1029 break; 1029 break;
1030#endif 1030#endif
@@ -1033,124 +1033,124 @@ static int dvb_init(struct saa7134_dev *dev)
1033 dev->dvb.frontend = tda10046_attach(&medion_cardbus, 1033 dev->dvb.frontend = tda10046_attach(&medion_cardbus,
1034 &dev->i2c_adap); 1034 &dev->i2c_adap);
1035 if (dev->dvb.frontend) { 1035 if (dev->dvb.frontend) {
1036 dev->dvb.frontend->ops->tuner_ops.init = philips_fmd1216_tuner_init; 1036 dev->dvb.frontend->ops.tuner_ops.init = philips_fmd1216_tuner_init;
1037 dev->dvb.frontend->ops->tuner_ops.sleep = philips_fmd1216_tuner_sleep; 1037 dev->dvb.frontend->ops.tuner_ops.sleep = philips_fmd1216_tuner_sleep;
1038 dev->dvb.frontend->ops->tuner_ops.set_params = philips_fmd1216_tuner_set_params; 1038 dev->dvb.frontend->ops.tuner_ops.set_params = philips_fmd1216_tuner_set_params;
1039 } 1039 }
1040 break; 1040 break;
1041 case SAA7134_BOARD_PHILIPS_TOUGH: 1041 case SAA7134_BOARD_PHILIPS_TOUGH:
1042 dev->dvb.frontend = tda10046_attach(&philips_tu1216_60_config, 1042 dev->dvb.frontend = tda10046_attach(&philips_tu1216_60_config,
1043 &dev->i2c_adap); 1043 &dev->i2c_adap);
1044 if (dev->dvb.frontend) { 1044 if (dev->dvb.frontend) {
1045 dev->dvb.frontend->ops->tuner_ops.init = philips_tu1216_tuner_60_init; 1045 dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_60_init;
1046 dev->dvb.frontend->ops->tuner_ops.set_params = philips_tu1216_tuner_60_set_params; 1046 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tu1216_tuner_60_set_params;
1047 } 1047 }
1048 break; 1048 break;
1049 case SAA7134_BOARD_FLYDVBTDUO: 1049 case SAA7134_BOARD_FLYDVBTDUO:
1050 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, 1050 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config,
1051 &dev->i2c_adap); 1051 &dev->i2c_adap);
1052 if (dev->dvb.frontend) { 1052 if (dev->dvb.frontend) {
1053 dev->dvb.frontend->ops->tuner_ops.init = philips_tda827x_tuner_init; 1053 dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init;
1054 dev->dvb.frontend->ops->tuner_ops.sleep = philips_tda827x_tuner_sleep; 1054 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep;
1055 dev->dvb.frontend->ops->tuner_ops.set_params = philips_tda827x_tuner_set_params; 1055 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params;
1056 } 1056 }
1057 break; 1057 break;
1058 case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS: 1058 case SAA7134_BOARD_FLYDVBT_DUO_CARDBUS:
1059 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, 1059 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config,
1060 &dev->i2c_adap); 1060 &dev->i2c_adap);
1061 if (dev->dvb.frontend) { 1061 if (dev->dvb.frontend) {
1062 dev->dvb.frontend->ops->tuner_ops.init = philips_tda827x_tuner_init; 1062 dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init;
1063 dev->dvb.frontend->ops->tuner_ops.sleep = philips_tda827x_tuner_sleep; 1063 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep;
1064 dev->dvb.frontend->ops->tuner_ops.set_params = philips_tda827x_tuner_set_params; 1064 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params;
1065 } 1065 }
1066 break; 1066 break;
1067 case SAA7134_BOARD_PHILIPS_EUROPA: 1067 case SAA7134_BOARD_PHILIPS_EUROPA:
1068 dev->dvb.frontend = tda10046_attach(&philips_europa_config, 1068 dev->dvb.frontend = tda10046_attach(&philips_europa_config,
1069 &dev->i2c_adap); 1069 &dev->i2c_adap);
1070 if (dev->dvb.frontend) { 1070 if (dev->dvb.frontend) {
1071 dev->original_demod_sleep = dev->dvb.frontend->ops->sleep; 1071 dev->original_demod_sleep = dev->dvb.frontend->ops.sleep;
1072 dev->dvb.frontend->ops->sleep = philips_europa_demod_sleep; 1072 dev->dvb.frontend->ops.sleep = philips_europa_demod_sleep;
1073 dev->dvb.frontend->ops->tuner_ops.init = philips_europa_tuner_init; 1073 dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init;
1074 dev->dvb.frontend->ops->tuner_ops.sleep = philips_europa_tuner_sleep; 1074 dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep;
1075 dev->dvb.frontend->ops->tuner_ops.set_params = philips_td1316_tuner_set_params; 1075 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1076 } 1076 }
1077 break; 1077 break;
1078 case SAA7134_BOARD_VIDEOMATE_DVBT_300: 1078 case SAA7134_BOARD_VIDEOMATE_DVBT_300:
1079 dev->dvb.frontend = tda10046_attach(&philips_europa_config, 1079 dev->dvb.frontend = tda10046_attach(&philips_europa_config,
1080 &dev->i2c_adap); 1080 &dev->i2c_adap);
1081 if (dev->dvb.frontend) { 1081 if (dev->dvb.frontend) {
1082 dev->dvb.frontend->ops->tuner_ops.init = philips_europa_tuner_init; 1082 dev->dvb.frontend->ops.tuner_ops.init = philips_europa_tuner_init;
1083 dev->dvb.frontend->ops->tuner_ops.sleep = philips_europa_tuner_sleep; 1083 dev->dvb.frontend->ops.tuner_ops.sleep = philips_europa_tuner_sleep;
1084 dev->dvb.frontend->ops->tuner_ops.set_params = philips_td1316_tuner_set_params; 1084 dev->dvb.frontend->ops.tuner_ops.set_params = philips_td1316_tuner_set_params;
1085 } 1085 }
1086 break; 1086 break;
1087 case SAA7134_BOARD_VIDEOMATE_DVBT_200: 1087 case SAA7134_BOARD_VIDEOMATE_DVBT_200:
1088 dev->dvb.frontend = tda10046_attach(&philips_tu1216_61_config, 1088 dev->dvb.frontend = tda10046_attach(&philips_tu1216_61_config,
1089 &dev->i2c_adap); 1089 &dev->i2c_adap);
1090 if (dev->dvb.frontend) { 1090 if (dev->dvb.frontend) {
1091 dev->dvb.frontend->ops->tuner_ops.init = philips_tu1216_tuner_61_init; 1091 dev->dvb.frontend->ops.tuner_ops.init = philips_tu1216_tuner_61_init;
1092 dev->dvb.frontend->ops->tuner_ops.set_params = philips_tu1216_tuner_61_set_params; 1092 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tu1216_tuner_61_set_params;
1093 } 1093 }
1094 break; 1094 break;
1095 case SAA7134_BOARD_PHILIPS_TIGER: 1095 case SAA7134_BOARD_PHILIPS_TIGER:
1096 dev->dvb.frontend = tda10046_attach(&philips_tiger_config, 1096 dev->dvb.frontend = tda10046_attach(&philips_tiger_config,
1097 &dev->i2c_adap); 1097 &dev->i2c_adap);
1098 if (dev->dvb.frontend) { 1098 if (dev->dvb.frontend) {
1099 dev->dvb.frontend->ops->tuner_ops.init = philips_tiger_tuner_init; 1099 dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
1100 dev->dvb.frontend->ops->tuner_ops.sleep = philips_tiger_tuner_sleep; 1100 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
1101 dev->dvb.frontend->ops->tuner_ops.set_params = philips_tiger_tuner_set_params; 1101 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
1102 } 1102 }
1103 break; 1103 break;
1104 case SAA7134_BOARD_ASUSTeK_P7131_DUAL: 1104 case SAA7134_BOARD_ASUSTeK_P7131_DUAL:
1105 dev->dvb.frontend = tda10046_attach(&philips_tiger_config, 1105 dev->dvb.frontend = tda10046_attach(&philips_tiger_config,
1106 &dev->i2c_adap); 1106 &dev->i2c_adap);
1107 if (dev->dvb.frontend) { 1107 if (dev->dvb.frontend) {
1108 dev->dvb.frontend->ops->tuner_ops.init = philips_tiger_tuner_init; 1108 dev->dvb.frontend->ops.tuner_ops.init = philips_tiger_tuner_init;
1109 dev->dvb.frontend->ops->tuner_ops.sleep = philips_tiger_tuner_sleep; 1109 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tiger_tuner_sleep;
1110 dev->dvb.frontend->ops->tuner_ops.set_params = philips_tiger_tuner_set_params; 1110 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tiger_tuner_set_params;
1111 } 1111 }
1112 break; 1112 break;
1113 case SAA7134_BOARD_FLYDVBT_LR301: 1113 case SAA7134_BOARD_FLYDVBT_LR301:
1114 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config, 1114 dev->dvb.frontend = tda10046_attach(&tda827x_lifeview_config,
1115 &dev->i2c_adap); 1115 &dev->i2c_adap);
1116 if (dev->dvb.frontend) { 1116 if (dev->dvb.frontend) {
1117 dev->dvb.frontend->ops->tuner_ops.init = philips_tda827x_tuner_init; 1117 dev->dvb.frontend->ops.tuner_ops.init = philips_tda827x_tuner_init;
1118 dev->dvb.frontend->ops->tuner_ops.sleep = philips_tda827x_tuner_sleep; 1118 dev->dvb.frontend->ops.tuner_ops.sleep = philips_tda827x_tuner_sleep;
1119 dev->dvb.frontend->ops->tuner_ops.set_params = philips_tda827x_tuner_set_params; 1119 dev->dvb.frontend->ops.tuner_ops.set_params = philips_tda827x_tuner_set_params;
1120 } 1120 }
1121 break; 1121 break;
1122 case SAA7134_BOARD_FLYDVB_TRIO: 1122 case SAA7134_BOARD_FLYDVB_TRIO:
1123 dev->dvb.frontend = tda10046_attach(&lifeview_trio_config, 1123 dev->dvb.frontend = tda10046_attach(&lifeview_trio_config,
1124 &dev->i2c_adap); 1124 &dev->i2c_adap);
1125 if (dev->dvb.frontend) { 1125 if (dev->dvb.frontend) {
1126 dev->dvb.frontend->ops->tuner_ops.sleep = lifeview_trio_tuner_sleep; 1126 dev->dvb.frontend->ops.tuner_ops.sleep = lifeview_trio_tuner_sleep;
1127 dev->dvb.frontend->ops->tuner_ops.set_params = lifeview_trio_tuner_set_params; 1127 dev->dvb.frontend->ops.tuner_ops.set_params = lifeview_trio_tuner_set_params;
1128 } 1128 }
1129 break; 1129 break;
1130 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331: 1130 case SAA7134_BOARD_ADS_DUO_CARDBUS_PTV331:
1131 dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, 1131 dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config,
1132 &dev->i2c_adap); 1132 &dev->i2c_adap);
1133 if (dev->dvb.frontend) { 1133 if (dev->dvb.frontend) {
1134 dev->dvb.frontend->ops->tuner_ops.init = ads_duo_tuner_init; 1134 dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init;
1135 dev->dvb.frontend->ops->tuner_ops.sleep = ads_duo_tuner_sleep; 1135 dev->dvb.frontend->ops.tuner_ops.sleep = ads_duo_tuner_sleep;
1136 dev->dvb.frontend->ops->tuner_ops.set_params = ads_duo_tuner_set_params; 1136 dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params;
1137 } 1137 }
1138 break; 1138 break;
1139 case SAA7134_BOARD_TEVION_DVBT_220RF: 1139 case SAA7134_BOARD_TEVION_DVBT_220RF:
1140 dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config, 1140 dev->dvb.frontend = tda10046_attach(&tevion_dvbt220rf_config,
1141 &dev->i2c_adap); 1141 &dev->i2c_adap);
1142 if (dev->dvb.frontend) { 1142 if (dev->dvb.frontend) {
1143 dev->dvb.frontend->ops->tuner_ops.sleep = tevion_dvb220rf_tuner_sleep; 1143 dev->dvb.frontend->ops.tuner_ops.sleep = tevion_dvb220rf_tuner_sleep;
1144 dev->dvb.frontend->ops->tuner_ops.set_params = tevion_dvb220rf_tuner_set_params; 1144 dev->dvb.frontend->ops.tuner_ops.set_params = tevion_dvb220rf_tuner_set_params;
1145 } 1145 }
1146 break; 1146 break;
1147 case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS: 1147 case SAA7134_BOARD_FLYDVBT_HYBRID_CARDBUS:
1148 dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config, 1148 dev->dvb.frontend = tda10046_attach(&ads_tech_duo_config,
1149 &dev->i2c_adap); 1149 &dev->i2c_adap);
1150 if (dev->dvb.frontend) { 1150 if (dev->dvb.frontend) {
1151 dev->dvb.frontend->ops->tuner_ops.init = ads_duo_tuner_init; 1151 dev->dvb.frontend->ops.tuner_ops.init = ads_duo_tuner_init;
1152 dev->dvb.frontend->ops->tuner_ops.sleep = ads_duo_tuner_sleep; 1152 dev->dvb.frontend->ops.tuner_ops.sleep = ads_duo_tuner_sleep;
1153 dev->dvb.frontend->ops->tuner_ops.set_params = ads_duo_tuner_set_params; 1153 dev->dvb.frontend->ops.tuner_ops.set_params = ads_duo_tuner_set_params;
1154 } 1154 }
1155 break; 1155 break;
1156#endif 1156#endif