summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2006-01-08 17:48:08 +0000
committerPatrick Boettcher <devnull@localhost>2006-01-08 17:48:08 +0000
commitbf620f1d9142a80e61eb2866819c1dd9cf47f893 (patch)
tree8be876e8e01c6d7372ad68d1039cb024f3bda40c /linux/drivers/media/dvb/dvb-usb
parentfcc2d9081cbe0204a46e4a29c19dfe635dcc908a (diff)
downloadmediapointer-dvb-s2-bf620f1d9142a80e61eb2866819c1dd9cf47f893.tar.gz
mediapointer-dvb-s2-bf620f1d9142a80e61eb2866819c1dd9cf47f893.tar.bz2
Check if PLL-description is set
From: Patrick Boettcher <pb@linuxtv.org> Check if in the dvb-usb-device-structure the dvb_pll_desc is set before use. 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/dvb-usb-i2c.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index da970947d..9b254532a 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
@@ -52,9 +52,8 @@ int dvb_usb_pll_init_i2c(struct dvb_frontend *fe)
struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = d->pll_init, .len = 4 };
int ret = 0;
- /* if there is nothing to initialize */
- if (d->pll_init[0] == 0x00 && d->pll_init[1] == 0x00 &&
- d->pll_init[2] == 0x00 && d->pll_init[3] == 0x00)
+ /* if pll_desc is not used */
+ if (d->pll_desc == NULL)
return 0;
if (d->tuner_pass_ctrl)
@@ -80,6 +79,9 @@ int dvb_usb_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep
{
struct dvb_usb_device *d = fe->dvb->priv;
+ if (d->pll_desc == NULL)
+ return 0;
+
deb_pll("pll addr: %x, freq: %d %p\n",d->pll_addr,fep->frequency,d->pll_desc);
b[0] = d->pll_addr << 1;