summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2007-11-22 15:13:00 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2007-11-22 15:13:00 -0500
commit1981777f44ff9cf7900677b77780ff372ec69b38 (patch)
treece2cd7a692d3152b3b0722e6783e78abcca87973 /linux/drivers
parent80a0676452e394005277e4411c821dc6dfec2f33 (diff)
downloadmediapointer-dvb-s2-1981777f44ff9cf7900677b77780ff372ec69b38.tar.gz
mediapointer-dvb-s2-1981777f44ff9cf7900677b77780ff372ec69b38.tar.bz2
tda18271: define init callback
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/frontends/tda18271.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271.c b/linux/drivers/media/dvb/frontends/tda18271.c
index 98b3f006d..8022741a8 100644
--- a/linux/drivers/media/dvb/frontends/tda18271.c
+++ b/linux/drivers/media/dvb/frontends/tda18271.c
@@ -430,17 +430,11 @@ static void tda18271_write_regs(struct dvb_frontend *fe, int idx, int len)
/*---------------------------------------------------------------------*/
-static void tda18271_init_regs(struct dvb_frontend *fe)
+static int tda18271_init_regs(struct dvb_frontend *fe)
{
struct tda18271_priv *priv = fe->tuner_priv;
unsigned char *regs = priv->tda18271_regs;
- tda18271_read_regs(fe);
-
- /* test IR_CAL_OK to see if we need init */
- if ((regs[R_EP1] & 0x08) != 0)
- return;
-
printk(KERN_INFO "tda18271: initializing registers\n");
/* initialize registers */
@@ -617,6 +611,8 @@ static void tda18271_init_regs(struct dvb_frontend *fe)
regs[R_EP1] = 0xc6;
tda18271_write_regs(fe, R_EP1, 1);
+
+ return 0;
}
static int tda18271_tune(struct dvb_frontend *fe,
@@ -627,6 +623,12 @@ static int tda18271_tune(struct dvb_frontend *fe,
u32 div, N = 0;
int i;
+ tda18271_read_regs(fe);
+
+ /* test IR_CAL_OK to see if we need init */
+ if ((regs[R_EP1] & 0x08) == 0)
+ tda18271_init_regs(fe);
+
#if 0
/* FIXME: FM Radio support */
if (t->mode == V4L2_TUNER_RADIO)
@@ -635,7 +637,6 @@ static int tda18271_tune(struct dvb_frontend *fe,
dprintk(1, "freq = %d, ifc = %d\n", freq, ifc);
- tda18271_init_regs(fe);
/* RF tracking filter calibration */
/* calculate BP_Filter */
@@ -1033,6 +1034,7 @@ static struct dvb_tuner_ops tda18271_tuner_ops = {
.frequency_max = 864000000,
.frequency_step = 62500
},
+ .init = tda18271_init_regs,
.set_params = tda18271_set_params,
.set_analog_params = tda18271_set_analog_params,
.release = tda18271_release,