diff options
author | Patrick Boettcher <pb@linuxtv.org> | 2006-02-05 19:06:00 +0100 |
---|---|---|
committer | Patrick Boettcher <pb@linuxtv.org> | 2006-02-05 19:06:00 +0100 |
commit | 74c650dc5c20cd5f4a80dd9a5bb897f6aa169951 (patch) | |
tree | f669de2f7223f0ffb1597178a642d47b13734b25 /linux/drivers/media/dvb/dvb-usb | |
parent | 8d97e37efd369482cc65c80d32e1b35a1ffe3801 (diff) | |
download | mediapointer-dvb-s2-74c650dc5c20cd5f4a80dd9a5bb897f6aa169951.tar.gz mediapointer-dvb-s2-74c650dc5c20cd5f4a80dd9a5bb897f6aa169951.tar.bz2 |
FIX: Check if FW was downloaded or not + new firmware file
From: Patrick Boettcher <pb@linuxtv.org>
When a firmware was downloaded dvb_usb_device_init returns NULL for the dvb_usb_device,
then nothing should be done with that pointer and device, because it will re-enumerate.
A new firmware should be used with digitv devices. It should make "slave"-devices work and others, too.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/digitv.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/digitv.c b/linux/drivers/media/dvb/dvb-usb/digitv.c index 38639b3c8..43d73d6ad 100644 --- a/linux/drivers/media/dvb/dvb-usb/digitv.c +++ b/linux/drivers/media/dvb/dvb-usb/digitv.c @@ -175,11 +175,13 @@ static int digitv_probe(struct usb_interface *intf, if ((ret = dvb_usb_device_init(intf,&digitv_properties,THIS_MODULE,&d)) == 0) { u8 b[4] = { 0 }; - b[0] = 1; - digitv_ctrl_msg(d,USB_WRITE_REMOTE_TYPE,0,b,4,NULL,0); + if (d != NULL) { /* do that only when the firmware is loaded */ + b[0] = 1; + digitv_ctrl_msg(d,USB_WRITE_REMOTE_TYPE,0,b,4,NULL,0); - b[0] = 0; - digitv_ctrl_msg(d,USB_WRITE_REMOTE,0,b,4,NULL,0); + b[0] = 0; + digitv_ctrl_msg(d,USB_WRITE_REMOTE,0,b,4,NULL,0); + } } return ret; } @@ -194,7 +196,7 @@ static struct dvb_usb_properties digitv_properties = { .caps = DVB_USB_IS_AN_I2C_ADAPTER, .usb_ctrl = CYPRESS_FX2, - .firmware = "dvb-usb-digitv-01.fw", + .firmware = "dvb-usb-digitv-02.fw", .size_of_priv = 0, @@ -229,6 +231,7 @@ static struct dvb_usb_properties digitv_properties = { { &digitv_table[0], NULL }, { NULL }, }, + { NULL }, } }; |