diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-07-07 02:07:35 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-07 02:07:35 -0400 |
commit | d763d5edf945eec47bd443b699f174976f0afc13 (patch) | |
tree | 3e5cd46b9a783999716bf92176854f4f1215d930 /drivers/media/dvb/dvb-usb | |
parent | 790e2a290b499b0400254e6870ec27969065d122 (diff) | |
parent | 1b40a895df6c7d5a80e71f65674060b03d84bbef (diff) |
Merge branch 'linus' into tracing/mmiotrace
Diffstat (limited to 'drivers/media/dvb/dvb-usb')
-rw-r--r-- | drivers/media/dvb/dvb-usb/Kconfig | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dib0700_devices.c | 21 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-firmware.c | 2 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/gl861.c | 27 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/gp8psk.c | 10 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/m920x.c | 7 | ||||
-rw-r--r-- | drivers/media/dvb/dvb-usb/umt-010.c | 2 |
7 files changed, 33 insertions, 38 deletions
diff --git a/drivers/media/dvb/dvb-usb/Kconfig b/drivers/media/dvb/dvb-usb/Kconfig index cf4584e48b6d..f00a0eb40420 100644 --- a/drivers/media/dvb/dvb-usb/Kconfig +++ b/drivers/media/dvb/dvb-usb/Kconfig | |||
@@ -1,6 +1,6 @@ | |||
1 | config DVB_USB | 1 | config DVB_USB |
2 | tristate "Support for various USB DVB devices" | 2 | tristate "Support for various USB DVB devices" |
3 | depends on DVB_CORE && USB && I2C | 3 | depends on DVB_CORE && USB && I2C && INPUT |
4 | depends on HOTPLUG # due to FW_LOADER | 4 | depends on HOTPLUG # due to FW_LOADER |
5 | select FW_LOADER | 5 | select FW_LOADER |
6 | help | 6 | help |
diff --git a/drivers/media/dvb/dvb-usb/dib0700_devices.c b/drivers/media/dvb/dvb-usb/dib0700_devices.c index 346223856f59..c4d40fe01d57 100644 --- a/drivers/media/dvb/dvb-usb/dib0700_devices.c +++ b/drivers/media/dvb/dvb-usb/dib0700_devices.c | |||
@@ -111,8 +111,8 @@ static int bristol_tuner_attach(struct dvb_usb_adapter *adap) | |||
111 | struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); | 111 | struct i2c_adapter *tun_i2c = dib3000mc_get_tuner_i2c_master(adap->fe, 1); |
112 | s8 a; | 112 | s8 a; |
113 | int if1=1220; | 113 | int if1=1220; |
114 | if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && | 114 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && |
115 | adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_500_2) { | 115 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_500_2)) { |
116 | if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; | 116 | if (!eeprom_read(prim_i2c,0x59 + adap->id,&a)) if1=1220+a; |
117 | } | 117 | } |
118 | return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id], | 118 | return dvb_attach(mt2060_attach,adap->fe, tun_i2c,&bristol_mt2060_config[adap->id], |
@@ -402,8 +402,8 @@ static int stk7700ph_frontend_attach(struct dvb_usb_adapter *adap) | |||
402 | { | 402 | { |
403 | struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; | 403 | struct usb_device_descriptor *desc = &adap->dev->udev->descriptor; |
404 | 404 | ||
405 | if (desc->idVendor == USB_VID_PINNACLE && | 405 | if (desc->idVendor == cpu_to_le16(USB_VID_PINNACLE) && |
406 | desc->idProduct == USB_PID_PINNACLE_EXPRESSCARD_320CX) | 406 | desc->idProduct == cpu_to_le16(USB_PID_PINNACLE_EXPRESSCARD_320CX)) |
407 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | 407 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); |
408 | else | 408 | else |
409 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); | 409 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
@@ -845,8 +845,8 @@ static int stk7700p_tuner_attach(struct dvb_usb_adapter *adap) | |||
845 | struct i2c_adapter *tun_i2c; | 845 | struct i2c_adapter *tun_i2c; |
846 | s8 a; | 846 | s8 a; |
847 | int if1=1220; | 847 | int if1=1220; |
848 | if (adap->dev->udev->descriptor.idVendor == USB_VID_HAUPPAUGE && | 848 | if (adap->dev->udev->descriptor.idVendor == cpu_to_le16(USB_VID_HAUPPAUGE) && |
849 | adap->dev->udev->descriptor.idProduct == USB_PID_HAUPPAUGE_NOVA_T_STICK) { | 849 | adap->dev->udev->descriptor.idProduct == cpu_to_le16(USB_PID_HAUPPAUGE_NOVA_T_STICK)) { |
850 | if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; | 850 | if (!eeprom_read(prim_i2c,0x58,&a)) if1=1220+a; |
851 | } | 851 | } |
852 | if (st->is_dib7000pc) | 852 | if (st->is_dib7000pc) |
@@ -990,11 +990,12 @@ static struct dib7000p_config dib7070p_dib7000p_config = { | |||
990 | /* STK7070P */ | 990 | /* STK7070P */ |
991 | static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) | 991 | static int stk7070p_frontend_attach(struct dvb_usb_adapter *adap) |
992 | { | 992 | { |
993 | if (adap->dev->udev->descriptor.idVendor == USB_VID_PINNACLE && | 993 | struct usb_device_descriptor *p = &adap->dev->udev->descriptor; |
994 | adap->dev->udev->descriptor.idProduct == USB_PID_PINNACLE_PCTV72E) | 994 | if (p->idVendor == cpu_to_le16(USB_VID_PINNACLE) && |
995 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | 995 | p->idProduct == cpu_to_le16(USB_PID_PINNACLE_PCTV72E)) |
996 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 0); | ||
996 | else | 997 | else |
997 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); | 998 | dib0700_set_gpio(adap->dev, GPIO6, GPIO_OUT, 1); |
998 | msleep(10); | 999 | msleep(10); |
999 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); | 1000 | dib0700_set_gpio(adap->dev, GPIO9, GPIO_OUT, 1); |
1000 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); | 1001 | dib0700_set_gpio(adap->dev, GPIO4, GPIO_OUT, 1); |
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c index e1112e39fb63..733a7ff7b207 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c | |||
@@ -127,7 +127,7 @@ int dvb_usb_get_hexline(const struct firmware *fw, struct hexline *hx, | |||
127 | if ((*pos + hx->len + 4) >= fw->size) | 127 | if ((*pos + hx->len + 4) >= fw->size) |
128 | return -EINVAL; | 128 | return -EINVAL; |
129 | 129 | ||
130 | hx->addr = le16_to_cpu( *((u16 *) &b[1]) ); | 130 | hx->addr = b[1] | (b[2] << 8); |
131 | hx->type = b[3]; | 131 | hx->type = b[3]; |
132 | 132 | ||
133 | if (hx->type == 0x04) { | 133 | if (hx->type == 0x04) { |
diff --git a/drivers/media/dvb/dvb-usb/gl861.c b/drivers/media/dvb/dvb-usb/gl861.c index 0a8ac64a4e33..037f7ffb47b2 100644 --- a/drivers/media/dvb/dvb-usb/gl861.c +++ b/drivers/media/dvb/dvb-usb/gl861.c | |||
@@ -47,6 +47,8 @@ static int gl861_i2c_msg(struct dvb_usb_device *d, u8 addr, | |||
47 | return -EINVAL; | 47 | return -EINVAL; |
48 | } | 48 | } |
49 | 49 | ||
50 | msleep(1); /* avoid I2C errors */ | ||
51 | |||
50 | return usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), req, type, | 52 | return usb_control_msg(d->udev, usb_rcvctrlpipe(d->udev, 0), req, type, |
51 | value, index, rbuf, rlen, 2000); | 53 | value, index, rbuf, rlen, 2000); |
52 | } | 54 | } |
@@ -92,16 +94,6 @@ static struct i2c_algorithm gl861_i2c_algo = { | |||
92 | }; | 94 | }; |
93 | 95 | ||
94 | /* Callbacks for DVB USB */ | 96 | /* Callbacks for DVB USB */ |
95 | static int gl861_identify_state(struct usb_device *udev, | ||
96 | struct dvb_usb_device_properties *props, | ||
97 | struct dvb_usb_device_description **desc, | ||
98 | int *cold) | ||
99 | { | ||
100 | *cold = 0; | ||
101 | |||
102 | return 0; | ||
103 | } | ||
104 | |||
105 | static struct zl10353_config gl861_zl10353_config = { | 97 | static struct zl10353_config gl861_zl10353_config = { |
106 | .demod_address = 0x0f, | 98 | .demod_address = 0x0f, |
107 | .no_tuner = 1, | 99 | .no_tuner = 1, |
@@ -172,7 +164,6 @@ static struct dvb_usb_device_properties gl861_properties = { | |||
172 | 164 | ||
173 | .size_of_priv = 0, | 165 | .size_of_priv = 0, |
174 | 166 | ||
175 | .identify_state = gl861_identify_state, | ||
176 | .num_adapters = 1, | 167 | .num_adapters = 1, |
177 | .adapter = {{ | 168 | .adapter = {{ |
178 | 169 | ||
@@ -194,13 +185,15 @@ static struct dvb_usb_device_properties gl861_properties = { | |||
194 | 185 | ||
195 | .num_device_descs = 2, | 186 | .num_device_descs = 2, |
196 | .devices = { | 187 | .devices = { |
197 | { "MSI Mega Sky 55801 DVB-T USB2.0", | 188 | { |
198 | { &gl861_table[0], NULL }, | 189 | .name = "MSI Mega Sky 55801 DVB-T USB2.0", |
199 | { NULL }, | 190 | .cold_ids = { NULL }, |
191 | .warm_ids = { &gl861_table[0], NULL }, | ||
200 | }, | 192 | }, |
201 | { "A-LINK DTU DVB-T USB2.0", | 193 | { |
202 | { &gl861_table[1], NULL }, | 194 | .name = "A-LINK DTU DVB-T USB2.0", |
203 | { NULL }, | 195 | .cold_ids = { NULL }, |
196 | .warm_ids = { &gl861_table[1], NULL }, | ||
204 | }, | 197 | }, |
205 | } | 198 | } |
206 | }; | 199 | }; |
diff --git a/drivers/media/dvb/dvb-usb/gp8psk.c b/drivers/media/dvb/dvb-usb/gp8psk.c index 9a942afaf0af..2653120673b7 100644 --- a/drivers/media/dvb/dvb-usb/gp8psk.c +++ b/drivers/media/dvb/dvb-usb/gp8psk.c | |||
@@ -146,24 +146,24 @@ static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff) | |||
146 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) | 146 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) |
147 | if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */ | 147 | if (! (status & bm8pskFW_Loaded)) /* BCM4500 firmware loaded */ |
148 | if(gp8psk_load_bcm4500fw(d)) | 148 | if(gp8psk_load_bcm4500fw(d)) |
149 | return EINVAL; | 149 | return -EINVAL; |
150 | 150 | ||
151 | if (! (status & bmIntersilOn)) /* LNB Power */ | 151 | if (! (status & bmIntersilOn)) /* LNB Power */ |
152 | if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, | 152 | if (gp8psk_usb_in_op(d, START_INTERSIL, 1, 0, |
153 | &buf, 1)) | 153 | &buf, 1)) |
154 | return EINVAL; | 154 | return -EINVAL; |
155 | 155 | ||
156 | /* Set DVB mode to 1 */ | 156 | /* Set DVB mode to 1 */ |
157 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) | 157 | if (gp_product_id == USB_PID_GENPIX_8PSK_REV_1_WARM) |
158 | if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) | 158 | if (gp8psk_usb_out_op(d, SET_DVB_MODE, 1, 0, NULL, 0)) |
159 | return EINVAL; | 159 | return -EINVAL; |
160 | /* Abort possible TS (if previous tune crashed) */ | 160 | /* Abort possible TS (if previous tune crashed) */ |
161 | if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) | 161 | if (gp8psk_usb_out_op(d, ARM_TRANSFER, 0, 0, NULL, 0)) |
162 | return EINVAL; | 162 | return -EINVAL; |
163 | } else { | 163 | } else { |
164 | /* Turn off LNB power */ | 164 | /* Turn off LNB power */ |
165 | if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) | 165 | if (gp8psk_usb_in_op(d, START_INTERSIL, 0, 0, &buf, 1)) |
166 | return EINVAL; | 166 | return -EINVAL; |
167 | /* Turn off 8psk power */ | 167 | /* Turn off 8psk power */ |
168 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) | 168 | if (gp8psk_usb_in_op(d, BOOT_8PSK, 0, 0, &buf, 1)) |
169 | return -EINVAL; | 169 | return -EINVAL; |
diff --git a/drivers/media/dvb/dvb-usb/m920x.c b/drivers/media/dvb/dvb-usb/m920x.c index a12e6f784fda..54626a0dbf68 100644 --- a/drivers/media/dvb/dvb-usb/m920x.c +++ b/drivers/media/dvb/dvb-usb/m920x.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include "qt1010.h" | 16 | #include "qt1010.h" |
17 | #include "tda1004x.h" | 17 | #include "tda1004x.h" |
18 | #include "tda827x.h" | 18 | #include "tda827x.h" |
19 | #include <asm/unaligned.h> | ||
19 | 20 | ||
20 | /* debug */ | 21 | /* debug */ |
21 | static int dvb_usb_m920x_debug; | 22 | static int dvb_usb_m920x_debug; |
@@ -347,13 +348,13 @@ static int m920x_firmware_download(struct usb_device *udev, const struct firmwar | |||
347 | 348 | ||
348 | for (pass = 0; pass < 2; pass++) { | 349 | for (pass = 0; pass < 2; pass++) { |
349 | for (i = 0; i + (sizeof(u16) * 3) < fw->size;) { | 350 | for (i = 0; i + (sizeof(u16) * 3) < fw->size;) { |
350 | value = le16_to_cpu(*(u16 *)(fw->data + i)); | 351 | value = get_unaligned_le16(fw->data + i); |
351 | i += sizeof(u16); | 352 | i += sizeof(u16); |
352 | 353 | ||
353 | index = le16_to_cpu(*(u16 *)(fw->data + i)); | 354 | index = get_unaligned_le16(fw->data + i); |
354 | i += sizeof(u16); | 355 | i += sizeof(u16); |
355 | 356 | ||
356 | size = le16_to_cpu(*(u16 *)(fw->data + i)); | 357 | size = get_unaligned_le16(fw->data + i); |
357 | i += sizeof(u16); | 358 | i += sizeof(u16); |
358 | 359 | ||
359 | if (pass == 1) { | 360 | if (pass == 1) { |
diff --git a/drivers/media/dvb/dvb-usb/umt-010.c b/drivers/media/dvb/dvb-usb/umt-010.c index 9e7653bb3b66..118aab1a3e54 100644 --- a/drivers/media/dvb/dvb-usb/umt-010.c +++ b/drivers/media/dvb/dvb-usb/umt-010.c | |||
@@ -107,7 +107,7 @@ static struct dvb_usb_device_properties umt_properties = { | |||
107 | /* parameter for the MPEG2-data transfer */ | 107 | /* parameter for the MPEG2-data transfer */ |
108 | .stream = { | 108 | .stream = { |
109 | .type = USB_BULK, | 109 | .type = USB_BULK, |
110 | .count = 20, | 110 | .count = MAX_NO_URBS_FOR_DATA_STREAM, |
111 | .endpoint = 0x06, | 111 | .endpoint = 0x06, |
112 | .u = { | 112 | .u = { |
113 | .bulk = { | 113 | .bulk = { |