diff options
Diffstat (limited to 'drivers/media/dvb/dvb-usb/m920x.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/m920x.c | 43 |
1 files changed, 33 insertions, 10 deletions
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index ed5c161c1c4b..c3e461e9fa71 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -86,12 +86,12 @@ static int m920x_init(struct dvb_usb_device *d, struct m920x_inits *rc_seq) | |||
86 | } | 86 | } |
87 | 87 | ||
88 | for (i = 0; i < d->props.num_adapters; i++) | 88 | for (i = 0; i < d->props.num_adapters; i++) |
89 | flags |= d->adapter[i].props.caps; | 89 | flags |= d->adapter[i].props.fe[0].caps; |
90 | 90 | ||
91 | /* Some devices(Dposh) might crash if we attempt touch at all. */ | 91 | /* Some devices(Dposh) might crash if we attempt touch at all. */ |
92 | if (flags & DVB_USB_ADAP_HAS_PID_FILTER) { | 92 | if (flags & DVB_USB_ADAP_HAS_PID_FILTER) { |
93 | for (i = 0; i < d->props.num_adapters; i++) { | 93 | for (i = 0; i < d->props.num_adapters; i++) { |
94 | epi = d->adapter[i].props.stream.endpoint - 0x81; | 94 | epi = d->adapter[i].props.fe[0].stream.endpoint - 0x81; |
95 | 95 | ||
96 | if (epi < 0 || epi >= M9206_MAX_ADAPTERS) { | 96 | if (epi < 0 || epi >= M9206_MAX_ADAPTERS) { |
97 | printk(KERN_INFO "m920x: Unexpected adapter endpoint!\n"); | 97 | printk(KERN_INFO "m920x: Unexpected adapter endpoint!\n"); |
@@ -292,7 +292,7 @@ static int m920x_update_filters(struct dvb_usb_adapter *adap) | |||
292 | struct m920x_state *m = adap->dev->priv; | 292 | struct m920x_state *m = adap->dev->priv; |
293 | int enabled = m->filtering_enabled[adap->id]; | 293 | int enabled = m->filtering_enabled[adap->id]; |
294 | int i, ret = 0, filter = 0; | 294 | int i, ret = 0, filter = 0; |
295 | int ep = adap->props.stream.endpoint; | 295 | int ep = adap->props.fe[0].stream.endpoint; |
296 | 296 | ||
297 | for (i = 0; i < M9206_MAX_FILTERS; i++) | 297 | for (i = 0; i < M9206_MAX_FILTERS; i++) |
298 | if (m->filters[adap->id][i] == 8192) | 298 | if (m->filters[adap->id][i] == 8192) |
@@ -501,7 +501,7 @@ static int m920x_mt352_frontend_attach(struct dvb_usb_adapter *adap) | |||
501 | { | 501 | { |
502 | deb("%s\n",__func__); | 502 | deb("%s\n",__func__); |
503 | 503 | ||
504 | if ((adap->fe[0] = dvb_attach(mt352_attach, | 504 | if ((adap->fe_adap[0].fe = dvb_attach(mt352_attach, |
505 | &m920x_mt352_config, | 505 | &m920x_mt352_config, |
506 | &adap->dev->i2c_adap)) == NULL) | 506 | &adap->dev->i2c_adap)) == NULL) |
507 | return -EIO; | 507 | return -EIO; |
@@ -513,7 +513,7 @@ static int m920x_tda10046_08_frontend_attach(struct dvb_usb_adapter *adap) | |||
513 | { | 513 | { |
514 | deb("%s\n",__func__); | 514 | deb("%s\n",__func__); |
515 | 515 | ||
516 | if ((adap->fe[0] = dvb_attach(tda10046_attach, | 516 | if ((adap->fe_adap[0].fe = dvb_attach(tda10046_attach, |
517 | &m920x_tda10046_08_config, | 517 | &m920x_tda10046_08_config, |
518 | &adap->dev->i2c_adap)) == NULL) | 518 | &adap->dev->i2c_adap)) == NULL) |
519 | return -EIO; | 519 | return -EIO; |
@@ -525,7 +525,7 @@ static int m920x_tda10046_0b_frontend_attach(struct dvb_usb_adapter *adap) | |||
525 | { | 525 | { |
526 | deb("%s\n",__func__); | 526 | deb("%s\n",__func__); |
527 | 527 | ||
528 | if ((adap->fe[0] = dvb_attach(tda10046_attach, | 528 | if ((adap->fe_adap[0].fe = dvb_attach(tda10046_attach, |
529 | &m920x_tda10046_0b_config, | 529 | &m920x_tda10046_0b_config, |
530 | &adap->dev->i2c_adap)) == NULL) | 530 | &adap->dev->i2c_adap)) == NULL) |
531 | return -EIO; | 531 | return -EIO; |
@@ -537,7 +537,7 @@ static int m920x_qt1010_tuner_attach(struct dvb_usb_adapter *adap) | |||
537 | { | 537 | { |
538 | deb("%s\n",__func__); | 538 | deb("%s\n",__func__); |
539 | 539 | ||
540 | if (dvb_attach(qt1010_attach, adap->fe[0], &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL) | 540 | if (dvb_attach(qt1010_attach, adap->fe_adap[0].fe, &adap->dev->i2c_adap, &m920x_qt1010_config) == NULL) |
541 | return -ENODEV; | 541 | return -ENODEV; |
542 | 542 | ||
543 | return 0; | 543 | return 0; |
@@ -547,7 +547,7 @@ static int m920x_tda8275_60_tuner_attach(struct dvb_usb_adapter *adap) | |||
547 | { | 547 | { |
548 | deb("%s\n",__func__); | 548 | deb("%s\n",__func__); |
549 | 549 | ||
550 | if (dvb_attach(tda827x_attach, adap->fe[0], 0x60, &adap->dev->i2c_adap, NULL) == NULL) | 550 | if (dvb_attach(tda827x_attach, adap->fe_adap[0].fe, 0x60, &adap->dev->i2c_adap, NULL) == NULL) |
551 | return -ENODEV; | 551 | return -ENODEV; |
552 | 552 | ||
553 | return 0; | 553 | return 0; |
@@ -557,7 +557,7 @@ static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap) | |||
557 | { | 557 | { |
558 | deb("%s\n",__func__); | 558 | deb("%s\n",__func__); |
559 | 559 | ||
560 | if (dvb_attach(tda827x_attach, adap->fe[0], 0x61, &adap->dev->i2c_adap, NULL) == NULL) | 560 | if (dvb_attach(tda827x_attach, adap->fe_adap[0].fe, 0x61, &adap->dev->i2c_adap, NULL) == NULL) |
561 | return -ENODEV; | 561 | return -ENODEV; |
562 | 562 | ||
563 | return 0; | 563 | return 0; |
@@ -565,7 +565,7 @@ static int m920x_tda8275_61_tuner_attach(struct dvb_usb_adapter *adap) | |||
565 | 565 | ||
566 | static int m920x_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) | 566 | static int m920x_fmd1216me_tuner_attach(struct dvb_usb_adapter *adap) |
567 | { | 567 | { |
568 | dvb_attach(simple_tuner_attach, adap->fe[0], | 568 | dvb_attach(simple_tuner_attach, adap->fe_adap[0].fe, |
569 | &adap->dev->i2c_adap, 0x61, | 569 | &adap->dev->i2c_adap, 0x61, |
570 | TUNER_PHILIPS_FMD1216ME_MK3); | 570 | TUNER_PHILIPS_FMD1216ME_MK3); |
571 | return 0; | 571 | return 0; |
@@ -807,6 +807,9 @@ static struct dvb_usb_device_properties megasky_properties = { | |||
807 | .identify_state = m920x_identify_state, | 807 | .identify_state = m920x_identify_state, |
808 | .num_adapters = 1, | 808 | .num_adapters = 1, |
809 | .adapter = {{ | 809 | .adapter = {{ |
810 | .num_frontends = 1, | ||
811 | .fe = {{ | ||
812 | |||
810 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 813 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
811 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 814 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
812 | 815 | ||
@@ -827,6 +830,7 @@ static struct dvb_usb_device_properties megasky_properties = { | |||
827 | } | 830 | } |
828 | } | 831 | } |
829 | }, | 832 | }, |
833 | }}, | ||
830 | }}, | 834 | }}, |
831 | .i2c_algo = &m920x_i2c_algo, | 835 | .i2c_algo = &m920x_i2c_algo, |
832 | 836 | ||
@@ -851,6 +855,9 @@ static struct dvb_usb_device_properties digivox_mini_ii_properties = { | |||
851 | .identify_state = m920x_identify_state, | 855 | .identify_state = m920x_identify_state, |
852 | .num_adapters = 1, | 856 | .num_adapters = 1, |
853 | .adapter = {{ | 857 | .adapter = {{ |
858 | .num_frontends = 1, | ||
859 | .fe = {{ | ||
860 | |||
854 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 861 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
855 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 862 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
856 | 863 | ||
@@ -871,6 +878,7 @@ static struct dvb_usb_device_properties digivox_mini_ii_properties = { | |||
871 | } | 878 | } |
872 | } | 879 | } |
873 | }, | 880 | }, |
881 | }}, | ||
874 | }}, | 882 | }}, |
875 | .i2c_algo = &m920x_i2c_algo, | 883 | .i2c_algo = &m920x_i2c_algo, |
876 | 884 | ||
@@ -910,6 +918,9 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
910 | .identify_state = m920x_identify_state, | 918 | .identify_state = m920x_identify_state, |
911 | .num_adapters = 2, | 919 | .num_adapters = 2, |
912 | .adapter = {{ | 920 | .adapter = {{ |
921 | .num_frontends = 1, | ||
922 | .fe = {{ | ||
923 | |||
913 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 924 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
914 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 925 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
915 | 926 | ||
@@ -929,7 +940,11 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
929 | .buffersize = 512, | 940 | .buffersize = 512, |
930 | } | 941 | } |
931 | } | 942 | } |
943 | }}, | ||
932 | }},{ | 944 | }},{ |
945 | .num_frontends = 1, | ||
946 | .fe = {{ | ||
947 | |||
933 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 948 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
934 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 949 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
935 | 950 | ||
@@ -949,6 +964,7 @@ static struct dvb_usb_device_properties tvwalkertwin_properties = { | |||
949 | .buffersize = 512, | 964 | .buffersize = 512, |
950 | } | 965 | } |
951 | } | 966 | } |
967 | }}, | ||
952 | }, | 968 | }, |
953 | }}, | 969 | }}, |
954 | .i2c_algo = &m920x_i2c_algo, | 970 | .i2c_algo = &m920x_i2c_algo, |
@@ -974,6 +990,8 @@ static struct dvb_usb_device_properties dposh_properties = { | |||
974 | .identify_state = m920x_identify_state, | 990 | .identify_state = m920x_identify_state, |
975 | .num_adapters = 1, | 991 | .num_adapters = 1, |
976 | .adapter = {{ | 992 | .adapter = {{ |
993 | .num_frontends = 1, | ||
994 | .fe = {{ | ||
977 | /* Hardware pid filters don't work with this device/firmware */ | 995 | /* Hardware pid filters don't work with this device/firmware */ |
978 | 996 | ||
979 | .frontend_attach = m920x_mt352_frontend_attach, | 997 | .frontend_attach = m920x_mt352_frontend_attach, |
@@ -989,6 +1007,7 @@ static struct dvb_usb_device_properties dposh_properties = { | |||
989 | } | 1007 | } |
990 | } | 1008 | } |
991 | }, | 1009 | }, |
1010 | }}, | ||
992 | }}, | 1011 | }}, |
993 | .i2c_algo = &m920x_i2c_algo, | 1012 | .i2c_algo = &m920x_i2c_algo, |
994 | 1013 | ||
@@ -1019,6 +1038,9 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = { | |||
1019 | .identify_state = m920x_identify_state, | 1038 | .identify_state = m920x_identify_state, |
1020 | .num_adapters = 1, | 1039 | .num_adapters = 1, |
1021 | .adapter = {{ | 1040 | .adapter = {{ |
1041 | .num_frontends = 1, | ||
1042 | .fe = {{ | ||
1043 | |||
1022 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | | 1044 | .caps = DVB_USB_ADAP_HAS_PID_FILTER | |
1023 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, | 1045 | DVB_USB_ADAP_PID_FILTER_CAN_BE_TURNED_OFF, |
1024 | 1046 | ||
@@ -1041,6 +1063,7 @@ static struct dvb_usb_device_properties pinnacle_pctv310e_properties = { | |||
1041 | } | 1063 | } |
1042 | } | 1064 | } |
1043 | }, | 1065 | }, |
1066 | }}, | ||
1044 | } }, | 1067 | } }, |
1045 | .i2c_algo = &m920x_i2c_algo, | 1068 | .i2c_algo = &m920x_i2c_algo, |
1046 | 1069 | ||