diff options
Diffstat (limited to 'drivers/media/dvb/ttusb-dec/ttusb_dec.c')
-rw-r--r-- | drivers/media/dvb/ttusb-dec/ttusb_dec.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/drivers/media/dvb/ttusb-dec/ttusb_dec.c b/drivers/media/dvb/ttusb-dec/ttusb_dec.c index 42eee04daa5d..fefdc05e84ac 100644 --- a/drivers/media/dvb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/dvb/ttusb-dec/ttusb_dec.c | |||
@@ -343,7 +343,7 @@ static int ttusb_dec_get_stb_state (struct ttusb_dec *dec, unsigned int *mode, | |||
343 | u8 c[COMMAND_PACKET_SIZE]; | 343 | u8 c[COMMAND_PACKET_SIZE]; |
344 | int c_length; | 344 | int c_length; |
345 | int result; | 345 | int result; |
346 | unsigned int tmp; | 346 | __be32 tmp; |
347 | 347 | ||
348 | dprintk("%s\n", __func__); | 348 | dprintk("%s\n", __func__); |
349 | 349 | ||
@@ -398,9 +398,9 @@ static void ttusb_dec_set_pids(struct ttusb_dec *dec) | |||
398 | 0x00, 0x00, 0xff, 0xff, | 398 | 0x00, 0x00, 0xff, 0xff, |
399 | 0xff, 0xff, 0xff, 0xff }; | 399 | 0xff, 0xff, 0xff, 0xff }; |
400 | 400 | ||
401 | u16 pcr = htons(dec->pid[DMX_PES_PCR]); | 401 | __be16 pcr = htons(dec->pid[DMX_PES_PCR]); |
402 | u16 audio = htons(dec->pid[DMX_PES_AUDIO]); | 402 | __be16 audio = htons(dec->pid[DMX_PES_AUDIO]); |
403 | u16 video = htons(dec->pid[DMX_PES_VIDEO]); | 403 | __be16 video = htons(dec->pid[DMX_PES_VIDEO]); |
404 | 404 | ||
405 | dprintk("%s\n", __func__); | 405 | dprintk("%s\n", __func__); |
406 | 406 | ||
@@ -435,7 +435,7 @@ static void ttusb_dec_process_pva(struct ttusb_dec *dec, u8 *pva, int length) | |||
435 | case 0x01: { /* VideoStream */ | 435 | case 0x01: { /* VideoStream */ |
436 | int prebytes = pva[5] & 0x03; | 436 | int prebytes = pva[5] & 0x03; |
437 | int postbytes = (pva[5] & 0x0c) >> 2; | 437 | int postbytes = (pva[5] & 0x0c) >> 2; |
438 | u16 v_pes_payload_length; | 438 | __be16 v_pes_payload_length; |
439 | 439 | ||
440 | if (output_pva) { | 440 | if (output_pva) { |
441 | dec->video_filter->feed->cb.ts(pva, length, NULL, 0, | 441 | dec->video_filter->feed->cb.ts(pva, length, NULL, 0, |
@@ -1006,7 +1006,7 @@ static int ttusb_dec_start_sec_feed(struct dvb_demux_feed *dvbdmxfeed) | |||
1006 | 0x00, 0x00, 0x00, 0x00, | 1006 | 0x00, 0x00, 0x00, 0x00, |
1007 | 0x00, 0x00, 0x00, 0x00, | 1007 | 0x00, 0x00, 0x00, 0x00, |
1008 | 0x00 }; | 1008 | 0x00 }; |
1009 | u16 pid; | 1009 | __be16 pid; |
1010 | u8 c[COMMAND_PACKET_SIZE]; | 1010 | u8 c[COMMAND_PACKET_SIZE]; |
1011 | int c_length; | 1011 | int c_length; |
1012 | int result; | 1012 | int result; |
@@ -1278,9 +1278,10 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) | |||
1278 | u8 *firmware = NULL; | 1278 | u8 *firmware = NULL; |
1279 | size_t firmware_size = 0; | 1279 | size_t firmware_size = 0; |
1280 | u16 firmware_csum = 0; | 1280 | u16 firmware_csum = 0; |
1281 | u16 firmware_csum_ns; | 1281 | __be16 firmware_csum_ns; |
1282 | u32 firmware_size_nl; | 1282 | __be32 firmware_size_nl; |
1283 | u32 crc32_csum, crc32_check, tmp; | 1283 | u32 crc32_csum, crc32_check; |
1284 | __be32 tmp; | ||
1284 | const struct firmware *fw_entry = NULL; | 1285 | const struct firmware *fw_entry = NULL; |
1285 | 1286 | ||
1286 | dprintk("%s\n", __func__); | 1287 | dprintk("%s\n", __func__); |
@@ -1306,7 +1307,7 @@ static int ttusb_dec_boot_dsp(struct ttusb_dec *dec) | |||
1306 | valid. */ | 1307 | valid. */ |
1307 | crc32_csum = crc32(~0L, firmware, 56) ^ ~0L; | 1308 | crc32_csum = crc32(~0L, firmware, 56) ^ ~0L; |
1308 | memcpy(&tmp, &firmware[56], 4); | 1309 | memcpy(&tmp, &firmware[56], 4); |
1309 | crc32_check = htonl(tmp); | 1310 | crc32_check = ntohl(tmp); |
1310 | if (crc32_csum != crc32_check) { | 1311 | if (crc32_csum != crc32_check) { |
1311 | printk("%s: crc32 check of DSP code failed (calculated " | 1312 | printk("%s: crc32 check of DSP code failed (calculated " |
1312 | "0x%08x != 0x%08x in file), file invalid.\n", | 1313 | "0x%08x != 0x%08x in file), file invalid.\n", |
@@ -1627,7 +1628,7 @@ static int ttusb_dec_probe(struct usb_interface *intf, | |||
1627 | 1628 | ||
1628 | usb_set_intfdata(intf, (void *)dec); | 1629 | usb_set_intfdata(intf, (void *)dec); |
1629 | 1630 | ||
1630 | switch (le16_to_cpu(id->idProduct)) { | 1631 | switch (id->idProduct) { |
1631 | case 0x1006: | 1632 | case 0x1006: |
1632 | ttusb_dec_set_model(dec, TTUSB_DEC3000S); | 1633 | ttusb_dec_set_model(dec, TTUSB_DEC3000S); |
1633 | break; | 1634 | break; |
@@ -1652,7 +1653,7 @@ static int ttusb_dec_probe(struct usb_interface *intf, | |||
1652 | ttusb_dec_init_dvb(dec); | 1653 | ttusb_dec_init_dvb(dec); |
1653 | 1654 | ||
1654 | dec->adapter.priv = dec; | 1655 | dec->adapter.priv = dec; |
1655 | switch (le16_to_cpu(id->idProduct)) { | 1656 | switch (id->idProduct) { |
1656 | case 0x1006: | 1657 | case 0x1006: |
1657 | dec->fe = ttusbdecfe_dvbs_attach(&fe_config); | 1658 | dec->fe = ttusbdecfe_dvbs_attach(&fe_config); |
1658 | break; | 1659 | break; |