Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330585
b: refs/heads/master
c: a0d72d2
h: refs/heads/master
i:
  330583: ef19da5
v: v3
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed Aug 4, 2012
1 parent b3ef041 commit 25c634b
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 196 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: 21f5a32e1f0a4ae086e4985d4a949e7289440c3a
refs/heads/master: a0d72d246d124096cad0b4bbce8a893e913f08a1
19 changes: 0 additions & 19 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,6 @@ struct dvb_usb_device_properties {
#define DVB_USB_IS_AN_I2C_ADAPTER 0x01
int caps;

#define DEVICE_SPECIFIC 0
#define CYPRESS_AN2135 1
#define CYPRESS_AN2235 2
#define CYPRESS_FX2 3
int usb_ctrl;

int size_of_priv;

const char *firmware;
Expand Down Expand Up @@ -398,17 +392,4 @@ extern int dvb_usbv2_generic_rw(struct dvb_usb_device *, u8 *, u16, u8 *, u16,
int);
extern int dvb_usbv2_generic_write(struct dvb_usb_device *, u8 *, u16);

/* commonly used firmware download types and function */
struct hexline {
u8 len;
u32 addr;
u8 type;
u8 data[255];
u8 chk;
};
extern int usbv2_cypress_load_firmware(struct usb_device *udev,
const struct firmware *fw, int type);
extern int dvb_usbv2_get_hexline(const struct firmware *fw, struct hexline *hx,
int *pos);

#endif
176 changes: 0 additions & 176 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb_firmware.c

This file was deleted.

42 changes: 42 additions & 0 deletions trunk/drivers/media/dvb/dvb-usb/dvb_usb_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,48 @@ module_param_named(force_pid_filter_usage, dvb_usb_force_pid_filter_usage,
MODULE_PARM_DESC(force_pid_filter_usage, "force all dvb-usb-devices to use a" \
" PID filter, if any (default: 0).");

int dvb_usb_download_firmware(struct dvb_usb_device *d)
{
int ret;
const struct firmware *fw = NULL;
const char *name;

/* resolve firmware name */
name = d->props.firmware;
if (d->props.get_firmware_name) {
ret = d->props.get_firmware_name(d, &name);
if (ret < 0)
return ret;
}

if (!d->props.download_firmware) {
ret = -EINVAL;
goto err;
}

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

info("downloading firmware from file '%s'", name);

ret = d->props.download_firmware(d, fw);

release_firmware(fw);

if (ret < 0)
goto err;

return 0;
err:
pr_debug("%s: failed=%d\n", __func__, ret);
return ret;
}

static int dvb_usb_adapter_init(struct dvb_usb_device *d)
{
struct dvb_usb_adapter *adap;
Expand Down

0 comments on commit 25c634b

Please sign in to comment.