aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/umt-010.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/dvb/dvb-usb/umt-010.c')
-rw-r--r--drivers/media/dvb/dvb-usb/umt-010.c38
1 files changed, 22 insertions, 16 deletions
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c
index 418a0b70715..f9941ea88b3 100644
--- a/drivers/media/dvb/dvb-usb/umt-010.c
+++ b/drivers/media/dvb/dvb-usb/umt-010.c
@@ -50,7 +50,7 @@ static int umt_mt352_demod_init(struct dvb_frontend *fe)
50 return 0; 50 return 0;
51} 51}
52 52
53static int umt_mt352_frontend_attach(struct dvb_usb_device *d) 53static int umt_mt352_frontend_attach(struct dvb_usb_adapter *adap)
54{ 54{
55 struct mt352_config umt_config; 55 struct mt352_config umt_config;
56 56
@@ -58,21 +58,21 @@ static int umt_mt352_frontend_attach(struct dvb_usb_device *d)
58 umt_config.demod_init = umt_mt352_demod_init; 58 umt_config.demod_init = umt_mt352_demod_init;
59 umt_config.demod_address = 0xf; 59 umt_config.demod_address = 0xf;
60 60
61 d->fe = dvb_attach(mt352_attach, &umt_config, &d->i2c_adap); 61 adap->fe = dvb_attach(mt352_attach, &umt_config, &adap->dev->i2c_adap);
62 62
63 return 0; 63 return 0;
64} 64}
65 65
66static int umt_tuner_attach (struct dvb_usb_device *d) 66static int umt_tuner_attach (struct dvb_usb_adapter *adap)
67{ 67{
68 d->pll_addr = 0x61; 68 adap->pll_addr = 0x61;
69 d->pll_desc = &dvb_pll_tua6034; 69 adap->pll_desc = &dvb_pll_tua6034;
70 d->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs; 70 adap->fe->ops.tuner_ops.calc_regs = dvb_usb_tuner_calc_regs;
71 return 0; 71 return 0;
72} 72}
73 73
74/* USB Driver stuff */ 74/* USB Driver stuff */
75static struct dvb_usb_properties umt_properties; 75static struct dvb_usb_device_properties umt_properties;
76 76
77static int umt_probe(struct usb_interface *intf, 77static int umt_probe(struct usb_interface *intf,
78 const struct usb_device_id *id) 78 const struct usb_device_id *id)
@@ -90,25 +90,22 @@ static struct usb_device_id umt_table [] = {
90}; 90};
91MODULE_DEVICE_TABLE (usb, umt_table); 91MODULE_DEVICE_TABLE (usb, umt_table);
92 92
93static struct dvb_usb_properties umt_properties = { 93static struct dvb_usb_device_properties umt_properties = {
94 .caps = DVB_USB_IS_AN_I2C_ADAPTER, 94 .caps = DVB_USB_IS_AN_I2C_ADAPTER,
95 95
96 .usb_ctrl = CYPRESS_FX2, 96 .usb_ctrl = CYPRESS_FX2,
97 .firmware = "dvb-usb-umt-010-02.fw", 97 .firmware = "dvb-usb-umt-010-02.fw",
98 98
99 .size_of_priv = sizeof(struct dibusb_state), 99 .num_adapters = 1,
100 100 .adapter = {
101 {
101 .streaming_ctrl = dibusb2_0_streaming_ctrl, 102 .streaming_ctrl = dibusb2_0_streaming_ctrl,
102 .power_ctrl = dibusb_power_ctrl,
103 .frontend_attach = umt_mt352_frontend_attach, 103 .frontend_attach = umt_mt352_frontend_attach,
104 .tuner_attach = umt_tuner_attach, 104 .tuner_attach = umt_tuner_attach,
105 105
106 .i2c_algo = &dibusb_i2c_algo,
107
108 .generic_bulk_ctrl_endpoint = 0x01,
109 /* parameter for the MPEG2-data transfer */ 106 /* parameter for the MPEG2-data transfer */
110 .urb = { 107 .stream = {
111 .type = DVB_USB_BULK, 108 .type = USB_BULK,
112 .count = 20, 109 .count = 20,
113 .endpoint = 0x06, 110 .endpoint = 0x06,
114 .u = { 111 .u = {
@@ -118,6 +115,15 @@ static struct dvb_usb_properties umt_properties = {
118 } 115 }
119 }, 116 },
120 117
118 .size_of_priv = sizeof(struct dibusb_state),
119 }
120 },
121 .power_ctrl = dibusb_power_ctrl,
122
123 .i2c_algo = &dibusb_i2c_algo,
124
125 .generic_bulk_ctrl_endpoint = 0x01,
126
121 .num_device_descs = 1, 127 .num_device_descs = 1,
122 .devices = { 128 .devices = {
123 { "Hanftek UMT-010 DVB-T USB2.0", 129 { "Hanftek UMT-010 DVB-T USB2.0",