Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330565
b: refs/heads/master
c: 8b9dff5
h: refs/heads/master
i:
  330563: 7c11e84
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent 088a1bb commit 262c13a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 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: 496e82789935df7a9b13ce58807973004e443847
refs/heads/master: 8b9dff5828cc91abddf8f4a44c8a38b1012052af
2 changes: 1 addition & 1 deletion trunk/drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ struct dvb_usb_device_properties {

#define RECONNECTS_USB 1
int (*download_firmware) (struct dvb_usb_device *, const struct firmware *);
const char *firmware;
int (*get_firmware_name) (struct dvb_usb_device *, const char **);

int size_of_priv;

Expand Down
11 changes: 8 additions & 3 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb_firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,20 @@ int dvb_usb_download_firmware(struct dvb_usb_device *d)
{
int ret;
const struct firmware *fw = NULL;
const char *name;

if ((ret = request_firmware(&fw, d->props.firmware, &d->udev->dev)) != 0) {
ret = d->props.get_firmware_name(d, &name);
if (ret < 0)
return ret;

if ((ret = request_firmware(&fw, name, &d->udev->dev)) != 0) {
err("did not find the firmware file. (%s) "
"Please see linux/Documentation/dvb/ for more details on firmware-problems. (%d)",
d->props.firmware,ret);
name,ret);
return ret;
}

info("downloading firmware from file '%s'", d->props.firmware);
info("downloading firmware from file '%s'", name);

switch (d->props.usb_ctrl) {
case CYPRESS_AN2135:
Expand Down

0 comments on commit 262c13a

Please sign in to comment.