diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-04 16:22:12 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-03-04 16:22:12 -0500 |
commit | 85a5d77abea94c3496f63dc3ba72f5f932daa799 (patch) | |
tree | 01d94b7630d770769d595b9c5d729d62a151c917 /drivers | |
parent | 6d04e3b04b6ab569cabeb5ca28ad1be11777e895 (diff) | |
parent | af70dbd3346999570db73b3bc3d4f7b7c004f2ea (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb
* master.kernel.org:/pub/scm/linux/kernel/git/mchehab/v4l-dvb:
V4L/DVB (5260): Cx88-blackbird: allow usage of both 376836 and 262144 sized firmware images
V4L/DVB (5366): Pvrusb2: Fix compilation warning for amd64 builds (use %zu instead of %u)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/cx88/cx88-blackbird.c | 14 | ||||
-rw-r--r-- | drivers/media/video/cx88/cx88.h | 1 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw.c | 2 |
3 files changed, 11 insertions, 6 deletions
diff --git a/drivers/media/video/cx88/cx88-blackbird.c b/drivers/media/video/cx88/cx88-blackbird.c index a1be1e279df4..b0466b88f52c 100644 --- a/drivers/media/video/cx88/cx88-blackbird.c +++ b/drivers/media/video/cx88/cx88-blackbird.c | |||
@@ -56,7 +56,8 @@ MODULE_PARM_DESC(debug,"enable debug messages [blackbird]"); | |||
56 | 56 | ||
57 | /* ------------------------------------------------------------------ */ | 57 | /* ------------------------------------------------------------------ */ |
58 | 58 | ||
59 | #define BLACKBIRD_FIRM_IMAGE_SIZE 256*1024 | 59 | #define OLD_BLACKBIRD_FIRM_IMAGE_SIZE 262144 |
60 | #define BLACKBIRD_FIRM_IMAGE_SIZE 376836 | ||
60 | 61 | ||
61 | /* defines below are from ivtv-driver.h */ | 62 | /* defines below are from ivtv-driver.h */ |
62 | 63 | ||
@@ -404,7 +405,7 @@ static int blackbird_find_mailbox(struct cx8802_dev *dev) | |||
404 | u32 value; | 405 | u32 value; |
405 | int i; | 406 | int i; |
406 | 407 | ||
407 | for (i = 0; i < BLACKBIRD_FIRM_IMAGE_SIZE; i++) { | 408 | for (i = 0; i < dev->fw_size; i++) { |
408 | memory_read(dev->core, i, &value); | 409 | memory_read(dev->core, i, &value); |
409 | if (value == signature[signaturecnt]) | 410 | if (value == signature[signaturecnt]) |
410 | signaturecnt++; | 411 | signaturecnt++; |
@@ -452,12 +453,15 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) | |||
452 | return -1; | 453 | return -1; |
453 | } | 454 | } |
454 | 455 | ||
455 | if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) { | 456 | if ((firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) && |
456 | dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n", | 457 | (firmware->size != OLD_BLACKBIRD_FIRM_IMAGE_SIZE)) { |
457 | firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE); | 458 | dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d or %d)\n", |
459 | firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE, | ||
460 | OLD_BLACKBIRD_FIRM_IMAGE_SIZE); | ||
458 | release_firmware(firmware); | 461 | release_firmware(firmware); |
459 | return -1; | 462 | return -1; |
460 | } | 463 | } |
464 | dev->fw_size = firmware->size; | ||
461 | 465 | ||
462 | if (0 != memcmp(firmware->data, magic, 8)) { | 466 | if (0 != memcmp(firmware->data, magic, 8)) { |
463 | dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n"); | 467 | dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n"); |
diff --git a/drivers/media/video/cx88/cx88.h b/drivers/media/video/cx88/cx88.h index d2ecfba9bb4d..a4f7befda5b0 100644 --- a/drivers/media/video/cx88/cx88.h +++ b/drivers/media/video/cx88/cx88.h | |||
@@ -463,6 +463,7 @@ struct cx8802_dev { | |||
463 | u32 mailbox; | 463 | u32 mailbox; |
464 | int width; | 464 | int width; |
465 | int height; | 465 | int height; |
466 | int fw_size; | ||
466 | 467 | ||
467 | #if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE) | 468 | #if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE) |
468 | /* for dvb only */ | 469 | /* for dvb only */ |
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c index 1cd4bb3ae260..1ff5138e4bb6 100644 --- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c +++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c | |||
@@ -1268,7 +1268,7 @@ int pvr2_upload_firmware2(struct pvr2_hdw *hdw) | |||
1268 | if (fw_len % sizeof(u32)) { | 1268 | if (fw_len % sizeof(u32)) { |
1269 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, | 1269 | pvr2_trace(PVR2_TRACE_ERROR_LEGS, |
1270 | "size of %s firmware" | 1270 | "size of %s firmware" |
1271 | " must be a multiple of %u bytes", | 1271 | " must be a multiple of %zu bytes", |
1272 | fw_files[fwidx],sizeof(u32)); | 1272 | fw_files[fwidx],sizeof(u32)); |
1273 | release_firmware(fw_entry); | 1273 | release_firmware(fw_entry); |
1274 | return -1; | 1274 | return -1; |