Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29970
b: refs/heads/master
c: 976e348
h: refs/heads/master
v: v3
  • Loading branch information
Patrick Boettcher authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 1038cc8 commit 44c6d0f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 14 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: 9bbe076f364aa7ba8c2e49e417a76d628ffb164c
refs/heads/master: 976e3483799ce5f718753d67454378d46500f0da
28 changes: 15 additions & 13 deletions trunk/drivers/media/dvb/dvb-usb/gp8psk.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,36 +92,38 @@ static int gp8psk_load_bcm4500fw(struct dvb_usb_device *d)
return ret;
}

if (gp8psk_usb_out_op(d, LOAD_BCM4500,1,0,NULL, 0)) {
release_firmware(fw);
return -EINVAL;
}
ret = -EINVAL;

if (gp8psk_usb_out_op(d, LOAD_BCM4500,1,0,NULL, 0))
goto out_rel_fw;

info("downloaidng bcm4500 firmware from file '%s'",bcm4500_firmware);

ptr = fw->data;
buf = (u8 *) kmalloc(512, GFP_KERNEL | GFP_DMA);
buf = kmalloc(512, GFP_KERNEL | GFP_DMA);

while (ptr[0] != 0xff) {
u16 buflen = ptr[0] + 4;
if (ptr + buflen >= fw->data + fw->size) {
err("failed to load bcm4500 firmware.");
release_firmware(fw);
kfree(buf);
return -EINVAL;
goto out_free;
}
memcpy(buf, ptr, buflen);
if (dvb_usb_generic_write(d, buf, buflen)) {
err("failed to load bcm4500 firmware.");
release_firmware(fw);
kfree(buf);
return -EIO;
goto out_free;
}
ptr += buflen;
}
release_firmware(fw);

ret = 0;

out_free:
kfree(buf);
return 0;
out_rel_fw:
release_firmware(fw);

return ret;
}

static int gp8psk_power_ctrl(struct dvb_usb_device *d, int onoff)
Expand Down

0 comments on commit 44c6d0f

Please sign in to comment.