diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 19:54:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-14 19:54:07 -0400 |
commit | 5a86102248592e178a9023359ccf7f0e489d8e35 (patch) | |
tree | 9e5fdb9aafca687fa412f7c034f2cfbb834b8567 /drivers/media/dvb/dvb-usb/cxusb.c | |
parent | 85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff) | |
parent | 751851af7aae9b8bd5a60b3897209081fbc18b2b (diff) |
Merge branch 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6
* 'for-2.6.27' of git://git.infradead.org/users/dwmw2/firmware-2.6: (64 commits)
firmware: convert sb16_csp driver to use firmware loader exclusively
dsp56k: use request_firmware
edgeport-ti: use request_firmware()
edgeport: use request_firmware()
vicam: use request_firmware()
dabusb: use request_firmware()
cpia2: use request_firmware()
ip2: use request_firmware()
firmware: convert Ambassador ATM driver to request_firmware()
whiteheat: use request_firmware()
ti_usb_3410_5052: use request_firmware()
emi62: use request_firmware()
emi26: use request_firmware()
keyspan_pda: use request_firmware()
keyspan: use request_firmware()
ttusb-budget: use request_firmware()
kaweth: use request_firmware()
smctr: use request_firmware()
firmware: convert ymfpci driver to use firmware loader exclusively
firmware: convert maestro3 driver to use firmware loader exclusively
...
Fix up trivial conflicts with BKL removal in drivers/char/dsp56k.c and
drivers/char/ip2/ip2main.c manually.
Diffstat (limited to 'drivers/media/dvb/dvb-usb/cxusb.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/cxusb.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-usb/cxusb.c b/drivers/media/dvb/dvb-usb/cxusb.c index 720fcd1c3c1d..0286156704f2 100644 --- a/drivers/media/dvb/dvb-usb/cxusb.c +++ b/drivers/media/dvb/dvb-usb/cxusb.c | |||
@@ -24,6 +24,7 @@ | |||
24 | * see Documentation/dvb/README.dvb-usb for more information | 24 | * see Documentation/dvb/README.dvb-usb for more information |
25 | */ | 25 | */ |
26 | #include <media/tuner.h> | 26 | #include <media/tuner.h> |
27 | #include <linux/vmalloc.h> | ||
27 | 28 | ||
28 | #include "cxusb.h" | 29 | #include "cxusb.h" |
29 | 30 | ||
@@ -700,12 +701,26 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev, | |||
700 | 701 | ||
701 | if (fw->data[idoff] == (USB_VID_DVICO & 0xff) && | 702 | if (fw->data[idoff] == (USB_VID_DVICO & 0xff) && |
702 | fw->data[idoff + 1] == USB_VID_DVICO >> 8) { | 703 | fw->data[idoff + 1] == USB_VID_DVICO >> 8) { |
703 | fw->data[idoff + 2] = | 704 | struct firmware new_fw; |
705 | u8 *new_fw_data = vmalloc(fw->size); | ||
706 | int ret; | ||
707 | |||
708 | if (!new_fw_data) | ||
709 | return -ENOMEM; | ||
710 | |||
711 | memcpy(new_fw_data, fw->data, fw->size); | ||
712 | new_fw.size = fw->size; | ||
713 | new_fw.data = new_fw_data; | ||
714 | |||
715 | new_fw_data[idoff + 2] = | ||
704 | le16_to_cpu(udev->descriptor.idProduct) + 1; | 716 | le16_to_cpu(udev->descriptor.idProduct) + 1; |
705 | fw->data[idoff + 3] = | 717 | new_fw_data[idoff + 3] = |
706 | le16_to_cpu(udev->descriptor.idProduct) >> 8; | 718 | le16_to_cpu(udev->descriptor.idProduct) >> 8; |
707 | 719 | ||
708 | return usb_cypress_load_firmware(udev, fw, CYPRESS_FX2); | 720 | ret = usb_cypress_load_firmware(udev, &new_fw, |
721 | CYPRESS_FX2); | ||
722 | vfree(new_fw_data); | ||
723 | return ret; | ||
709 | } | 724 | } |
710 | } | 725 | } |
711 | 726 | ||