aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-01-09 15:21:33 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-09 15:21:33 -0500
commita6bab889c4d21cb8c0b0a25959daba87a56eccbb (patch)
treea5401371f3834d84372bee0d3b0672d68ba147e2 /drivers/media/dvb
parent4e5910e6fe5d977a36f7f39f6b13d61109eca19f (diff)
V4L/DVB (3320): Check if PLL-description is set
- Check if in the dvb-usb-device-structure the dvb_pll_desc is set before use. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-i2c.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index da970947dfc7..9b254532af4d 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
@@ -52,9 +52,8 @@ int dvb_usb_pll_init_i2c(struct dvb_frontend *fe)
52 struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = d->pll_init, .len = 4 }; 52 struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = d->pll_init, .len = 4 };
53 int ret = 0; 53 int ret = 0;
54 54
55 /* if there is nothing to initialize */ 55 /* if pll_desc is not used */
56 if (d->pll_init[0] == 0x00 && d->pll_init[1] == 0x00 && 56 if (d->pll_desc == NULL)
57 d->pll_init[2] == 0x00 && d->pll_init[3] == 0x00)
58 return 0; 57 return 0;
59 58
60 if (d->tuner_pass_ctrl) 59 if (d->tuner_pass_ctrl)
@@ -80,6 +79,9 @@ int dvb_usb_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep
80{ 79{
81 struct dvb_usb_device *d = fe->dvb->priv; 80 struct dvb_usb_device *d = fe->dvb->priv;
82 81
82 if (d->pll_desc == NULL)
83 return 0;
84
83 deb_pll("pll addr: %x, freq: %d %p\n",d->pll_addr,fep->frequency,d->pll_desc); 85 deb_pll("pll addr: %x, freq: %d %p\n",d->pll_addr,fep->frequency,d->pll_desc);
84 86
85 b[0] = d->pll_addr << 1; 87 b[0] = d->pll_addr << 1;