diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-01-09 21:21:38 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@brturbo.com.br> | 2006-01-09 21:21:38 +0100 |
commit | f53737882e26ff08022fec6ad79f061c49dadda2 (patch) | |
tree | d07379f003fbb144790b24e845045edfb4f517be /drivers/media/dvb/dvb-usb/dvb-usb-firmware.c | |
parent | V4L/DVB (3326): Fix stereo and standard reporting of msp3400 (esp. for radio) (diff) | |
download | linux-f53737882e26ff08022fec6ad79f061c49dadda2.tar.xz linux-f53737882e26ff08022fec6ad79f061c49dadda2.zip |
V4L/DVB (3327): Remove DViCO specific firmware hacks from the generic code.
- Move the code that patches bluebird firmware before upload from the
generic code into the cxusb driver itself.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Michael Krufky <mkrufky@m1k.net>
Signed-off-by: Chris Pascoe <c.pascoe@itee.uq.edu.au>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/dvb-usb-firmware.c')
-rw-r--r-- | drivers/media/dvb/dvb-usb/dvb-usb-firmware.c | 30 |
1 files changed, 2 insertions, 28 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c index b2670476c3f2..8535895819fb 100644 --- a/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c +++ b/drivers/media/dvb/dvb-usb/dvb-usb-firmware.c @@ -33,7 +33,7 @@ static int usb_cypress_writemem(struct usb_device *udev,u16 addr,u8 *data, u8 le 0xa0, USB_TYPE_VENDOR, addr, 0x00, data, len, 5000); } -static int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) +int usb_cypress_load_firmware(struct usb_device *udev, const struct firmware *fw, int type) { struct hexline hx; u8 reset; @@ -73,27 +73,7 @@ static int usb_cypress_load_firmware(struct usb_device *udev, const struct firmw return ret; } - -/* - * DViCO bluebird firmware needs the "warm" product ID to be patched into the - * firmware file before download. - */ -#define BLUEBIRD_01_ID_OFFSET 6638 -static int dvb_usb_patch_dvico_firmware(struct usb_device *udev, const struct firmware *fw) -{ - if (fw->size < BLUEBIRD_01_ID_OFFSET + 4) - return -EINVAL; - - if (fw->data[BLUEBIRD_01_ID_OFFSET] == (USB_VID_DVICO & 0xff) && - fw->data[BLUEBIRD_01_ID_OFFSET + 1] == USB_VID_DVICO >> 8) { - fw->data[BLUEBIRD_01_ID_OFFSET + 2] = udev->descriptor.idProduct + 1; - fw->data[BLUEBIRD_01_ID_OFFSET + 3] = udev->descriptor.idProduct >> 8; - - return 0; - } - - return -EINVAL; -} +EXPORT_SYMBOL(usb_cypress_load_firmware); int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_properties *props) { @@ -109,12 +89,6 @@ int dvb_usb_download_firmware(struct usb_device *udev, struct dvb_usb_properties info("downloading firmware from file '%s'",props->firmware); - if (le16_to_cpu(udev->descriptor.idVendor) == USB_VID_DVICO) { - ret = dvb_usb_patch_dvico_firmware(udev, fw); - if (ret != 0) - warn("this firmware file not recognised"); - } - switch (props->usb_ctrl) { case CYPRESS_AN2135: case CYPRESS_AN2235: |