summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-02-14 01:29:32 -0500
committerMichael Krufky <mkrufky@linuxtv.org>2008-02-14 01:29:32 -0500
commit6524b78cc55995e6f8fc4474f6ec3af840abc929 (patch)
tree64f27f581fbf854774058620d43fe9e0dcf5b4a5 /linux
parentf66278931e5ad6cd06408f65716e6a9c151e1ed2 (diff)
downloadmediapointer-dvb-s2-6524b78cc55995e6f8fc4474f6ec3af840abc929.tar.gz
mediapointer-dvb-s2-6524b78cc55995e6f8fc4474f6ec3af840abc929.tar.bz2
tda18271: move init functions to directly above tda18271_tune
From: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/dvb/frontends/tda18271-fe.c78
1 files changed, 38 insertions, 40 deletions
diff --git a/linux/drivers/media/dvb/frontends/tda18271-fe.c b/linux/drivers/media/dvb/frontends/tda18271-fe.c
index 304dfb3cc..dfa7456de 100644
--- a/linux/drivers/media/dvb/frontends/tda18271-fe.c
+++ b/linux/drivers/media/dvb/frontends/tda18271-fe.c
@@ -37,22 +37,6 @@ static LIST_HEAD(hybrid_tuner_instance_list);
/*---------------------------------------------------------------------*/
-static int tda18271_ir_cal_init(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)
- tda18271_init_regs(fe);
-
- return 0;
-}
-
-/* ------------------------------------------------------------------ */
-
static int tda18271_channel_configuration(struct dvb_frontend *fe,
u32 ifc, u32 freq, u32 bw, u8 std,
int radio)
@@ -215,6 +199,8 @@ static int tda18271_read_thermometer(struct dvb_frontend *fe)
return tm;
}
+/* ------------------------------------------------------------------ */
+
static int tda18271c2_rf_tracking_filters_correction(struct dvb_frontend *fe,
u32 freq)
{
@@ -611,7 +597,7 @@ static int tda18271_calc_rf_filter_curve(struct dvb_frontend *fe)
/* ------------------------------------------------------------------ */
-static int tda18271_rf_cal_init(struct dvb_frontend *fe)
+static int tda18271c2_rf_cal_init(struct dvb_frontend *fe)
{
struct tda18271_priv *priv = fe->tuner_priv;
unsigned char *regs = priv->tda18271_regs;
@@ -634,28 +620,6 @@ static int tda18271_rf_cal_init(struct dvb_frontend *fe)
return 0;
}
-static int tda18271_init(struct dvb_frontend *fe)
-{
- struct tda18271_priv *priv = fe->tuner_priv;
-
- mutex_lock(&priv->lock);
-
- /* power up */
- tda18271_set_standby_mode(fe, 0, 0, 0);
-
- /* initialization */
- tda18271_ir_cal_init(fe);
-
- if (priv->id == TDA18271HDC2)
- tda18271_rf_cal_init(fe);
-
- mutex_unlock(&priv->lock);
-
- return 0;
-}
-
-/* ------------------------------------------------------------------ */
-
static int tda18271c1_rf_tracking_filter_calibration(struct dvb_frontend *fe,
u32 freq, u32 bw)
{
@@ -753,6 +717,40 @@ static int tda18271c1_rf_tracking_filter_calibration(struct dvb_frontend *fe,
/* ------------------------------------------------------------------ */
+static int tda18271_ir_cal_init(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)
+ tda18271_init_regs(fe);
+
+ return 0;
+}
+
+static int tda18271_init(struct dvb_frontend *fe)
+{
+ struct tda18271_priv *priv = fe->tuner_priv;
+
+ mutex_lock(&priv->lock);
+
+ /* power up */
+ tda18271_set_standby_mode(fe, 0, 0, 0);
+
+ /* initialization */
+ tda18271_ir_cal_init(fe);
+
+ if (priv->id == TDA18271HDC2)
+ tda18271c2_rf_cal_init(fe);
+
+ mutex_unlock(&priv->lock);
+
+ return 0;
+}
+
static int tda18271_tune(struct dvb_frontend *fe,
u32 ifc, u32 freq, u32 bw, u8 std, int radio)
{
@@ -1117,7 +1115,7 @@ struct dvb_frontend *tda18271_attach(struct dvb_frontend *fe, u8 addr,
tda18271_init_regs(fe);
if ((tda18271_cal_on_startup) && (priv->id == TDA18271HDC2))
- tda18271_rf_cal_init(fe);
+ tda18271c2_rf_cal_init(fe);
mutex_unlock(&priv->lock);
break;