Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100960
b: refs/heads/master
c: e62f89f
h: refs/heads/master
v: v3
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jul 10, 2008
1 parent 53c1a0f commit 5a326af
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bc179153ae2334efe28cf4f3300e024da7d83753
refs/heads/master: e62f89f2aebd57f48687f139c20cf6375693b622
21 changes: 18 additions & 3 deletions trunk/drivers/media/dvb/dvb-usb/cxusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* see Documentation/dvb/README.dvb-usb for more information
*/
#include <media/tuner.h>
#include <linux/vmalloc.h>

#include "cxusb.h"

Expand Down Expand Up @@ -700,12 +701,26 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev,

if (fw->data[idoff] == (USB_VID_DVICO & 0xff) &&
fw->data[idoff + 1] == USB_VID_DVICO >> 8) {
fw->data[idoff + 2] =
struct firmware new_fw;
u8 *new_fw_data = vmalloc(fw->size);
int ret;

if (!new_fw_data)
return -ENOMEM;

memcpy(new_fw_data, fw->data, fw->size);
new_fw.size = fw->size;
new_fw.data = new_fw_data;

new_fw_data[idoff + 2] =
le16_to_cpu(udev->descriptor.idProduct) + 1;
fw->data[idoff + 3] =
new_fw_data[idoff + 3] =
le16_to_cpu(udev->descriptor.idProduct) >> 8;

return usb_cypress_load_firmware(udev, fw, CYPRESS_FX2);
ret = usb_cypress_load_firmware(udev, &new_fw,
CYPRESS_FX2);
vfree(new_fw_data);
return ret;
}
}

Expand Down

0 comments on commit 5a326af

Please sign in to comment.