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)

+11 -6
+9 -5
drivers/media/video/cx88/cx88-blackbird.c
··· 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 62 /* defines below are from ivtv-driver.h */ 62 63 ··· 405 404 u32 value; 406 405 int i; 407 406 408 - for (i = 0; i < BLACKBIRD_FIRM_IMAGE_SIZE; i++) { 407 + for (i = 0; i < dev->fw_size; i++) { 409 408 memory_read(dev->core, i, &value); 410 409 if (value == signature[signaturecnt]) 411 410 signaturecnt++; ··· 453 452 return -1; 454 453 } 455 454 456 - if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) { 457 - dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d)\n", 458 - firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE); 455 + if ((firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) && 456 + (firmware->size != OLD_BLACKBIRD_FIRM_IMAGE_SIZE)) { 457 + dprintk(0, "ERROR: Firmware size mismatch (have %zd, expected %d or %d)\n", 458 + firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE, 459 + OLD_BLACKBIRD_FIRM_IMAGE_SIZE); 459 460 release_firmware(firmware); 460 461 return -1; 461 462 } 463 + dev->fw_size = firmware->size; 462 464 463 465 if (0 != memcmp(firmware->data, magic, 8)) { 464 466 dprintk(0, "ERROR: Firmware magic mismatch, wrong file?\n");
+1
drivers/media/video/cx88/cx88.h
··· 463 463 u32 mailbox; 464 464 int width; 465 465 int height; 466 + int fw_size; 466 467 467 468 #if defined(CONFIG_VIDEO_BUF_DVB) || defined(CONFIG_VIDEO_BUF_DVB_MODULE) 468 469 /* for dvb only */
+1 -1
drivers/media/video/pvrusb2/pvrusb2-hdw.c
··· 1268 1268 if (fw_len % sizeof(u32)) { 1269 1269 pvr2_trace(PVR2_TRACE_ERROR_LEGS, 1270 1270 "size of %s firmware" 1271 - " must be a multiple of %u bytes", 1271 + " must be a multiple of %zu bytes", 1272 1272 fw_files[fwidx],sizeof(u32)); 1273 1273 release_firmware(fw_entry); 1274 1274 return -1;