summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-hdw.c
diff options
context:
space:
mode:
authorMike Isely <isely@pobox.com>2009-11-25 06:52:06 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 21:42:09 +0100
commit568efaa2f704f72eef9b70ac0f895e9b961f15a6 (patch)
tree443649ea52cbeb944ccc4fcce3edf1f95bda2aa4 /drivers/media/video/pvrusb2/pvrusb2-hdw.c
parentV4L/DVB (13495): pvrusb2: Support 16KB FX2 firmware (diff)
downloadlinux-568efaa2f704f72eef9b70ac0f895e9b961f15a6.tar.xz
linux-568efaa2f704f72eef9b70ac0f895e9b961f15a6.zip
V4L/DVB (13496): pvrusb2: Support manual extraction of 16KB FX2 firmware
This pvrusb2 change is in support of an existing feature used to help identify and locate newer vendor supplied firmware. This change makes the feature work for the newer larger firmware size. Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-hdw.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 9be04772c723..bd05ec7b1cbe 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -3514,7 +3514,7 @@ static u8 *pvr2_full_eeprom_fetch(struct pvr2_hdw *hdw)
void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw,
- int prom_flag,
+ int mode,
int enable_flag)
{
int ret;
@@ -3537,11 +3537,12 @@ void pvr2_hdw_cpufw_set_enabled(struct pvr2_hdw *hdw,
break;
}
- hdw->fw_cpu_flag = (prom_flag == 0);
+ hdw->fw_cpu_flag = (mode != 2);
if (hdw->fw_cpu_flag) {
+ hdw->fw_size = (mode == 1) ? 0x4000 : 0x2000;
pvr2_trace(PVR2_TRACE_FIRMWARE,
- "Preparing to suck out CPU firmware");
- hdw->fw_size = 0x2000;
+ "Preparing to suck out CPU firmware"
+ " (size=%u)", hdw->fw_size);
hdw->fw_buffer = kzalloc(hdw->fw_size,GFP_KERNEL);
if (!hdw->fw_buffer) {
hdw->fw_size = 0;