diff options
author | Antti Palosaari <crope@iki.fi> | 2013-03-07 17:59:55 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-21 19:00:38 -0300 |
commit | 8229da506488ec67a051593fe452ee54e91c70cf (patch) | |
tree | 803412f07fb70be3b4ef7d32bc14b22248e98717 /drivers/media/usb/dvb-usb-v2 | |
parent | 9d7b848e4311a77a9c62df481278e6efb23cba4a (diff) | |
download | linux-stable-8229da506488ec67a051593fe452ee54e91c70cf.tar.gz linux-stable-8229da506488ec67a051593fe452ee54e91c70cf.tar.bz2 linux-stable-8229da506488ec67a051593fe452ee54e91c70cf.zip |
[media] af9035: select firmware loader according to firmware
AF9035 and IT9135 supports two different firmware format. Select
correct loader according to first byte of firmware file.
Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/dvb-usb-v2')
-rw-r--r-- | drivers/media/usb/dvb-usb-v2/af9035.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c b/drivers/media/usb/dvb-usb-v2/af9035.c index ce8cccb8946a..75d99aec10b6 100644 --- a/drivers/media/usb/dvb-usb-v2/af9035.c +++ b/drivers/media/usb/dvb-usb-v2/af9035.c @@ -344,7 +344,7 @@ err: return ret; } -static int af9035_download_firmware_af9035(struct dvb_usb_device *d, +static int af9035_download_firmware_old(struct dvb_usb_device *d, const struct firmware *fw) { int ret, i, j, len; @@ -430,7 +430,7 @@ err: return ret; } -static int af9035_download_firmware_it9135(struct dvb_usb_device *d, +static int af9035_download_firmware_new(struct dvb_usb_device *d, const struct firmware *fw) { int ret, i, i_prev; @@ -540,10 +540,10 @@ static int af9035_download_firmware(struct dvb_usb_device *d, } } - if (state->chip_type == 0x9135) - ret = af9035_download_firmware_it9135(d, fw); + if (fw->data[0] == 0x01) + ret = af9035_download_firmware_old(d, fw); else - ret = af9035_download_firmware_af9035(d, fw); + ret = af9035_download_firmware_new(d, fw); if (ret < 0) goto err; |