Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76635
b: refs/heads/master
c: bc3e5c7
h: refs/heads/master
i:
  76633: 7ac637a
  76631: c4c137d
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent aee6fe3 commit 0db548c
Show file tree
Hide file tree
Showing 6 changed files with 67 additions and 71 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9ad89f0104314786138d580ab2c1119e7e470f56
refs/heads/master: bc3e5c7fc20d3c09667067878fb7a55dd9fc041d
4 changes: 2 additions & 2 deletions trunk/drivers/media/dvb/dvb-core/dvb_frontend.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ struct analog_demod_info {
char *name;
};

struct analog_tuner_ops {
struct analog_demod_ops {

struct analog_demod_info info;

Expand Down Expand Up @@ -168,7 +168,7 @@ struct dvb_frontend_ops {
int (*ts_bus_ctrl)(struct dvb_frontend* fe, int acquire);

struct dvb_tuner_ops tuner_ops;
struct analog_tuner_ops *analog_demod_ops;
struct analog_demod_ops analog_ops;
};

#define MAX_EVENT 8
Expand Down
5 changes: 2 additions & 3 deletions trunk/drivers/media/dvb/frontends/tda18271-fe.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ struct tda18271_priv {
static int tda18271_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)
{
struct tda18271_priv *priv = fe->tuner_priv;
struct analog_tuner_ops *ops = fe->ops.analog_demod_ops;
enum tda18271_i2c_gate gate;
int ret = 0;

Expand All @@ -74,8 +73,8 @@ static int tda18271_i2c_gate_ctrl(struct dvb_frontend *fe, int enable)

switch (gate) {
case TDA18271_GATE_ANALOG:
if (ops && ops->i2c_gate_ctrl)
ret = ops->i2c_gate_ctrl(fe, enable);
if (fe->ops.analog_ops.i2c_gate_ctrl)
ret = fe->ops.analog_ops.i2c_gate_ctrl(fe, enable);
break;
case TDA18271_GATE_DIGITAL:
if (fe->ops.i2c_gate_ctrl)
Expand Down
23 changes: 12 additions & 11 deletions trunk/drivers/media/video/tda8290.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,16 +512,16 @@ static void tda829x_release(struct dvb_frontend *fe)
static int tda829x_find_tuner(struct dvb_frontend *fe)
{
struct tda8290_priv *priv = fe->analog_demod_priv;
struct analog_tuner_ops *ops = fe->ops.analog_demod_ops;
struct analog_demod_ops *analog_ops = &fe->ops.analog_ops;
int i, ret, tuners_found;
u32 tuner_addrs;
u8 data;
struct i2c_msg msg = { .flags = I2C_M_RD, .buf = &data, .len = 1 };

if (NULL == ops)
if (NULL == analog_ops->i2c_gate_ctrl)
return -EINVAL;

ops->i2c_gate_ctrl(fe, 1);
analog_ops->i2c_gate_ctrl(fe, 1);

/* probe for tuner chip */
tuners_found = 0;
Expand All @@ -539,7 +539,7 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
give a response now
*/

ops->i2c_gate_ctrl(fe, 0);
analog_ops->i2c_gate_ctrl(fe, 0);

if (tuners_found > 1)
for (i = 0; i < tuners_found; i++) {
Expand All @@ -562,7 +562,7 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
priv->tda827x_addr = tuner_addrs;
msg.addr = tuner_addrs;

ops->i2c_gate_ctrl(fe, 1);
analog_ops->i2c_gate_ctrl(fe, 1);
ret = i2c_transfer(priv->i2c_props.adap, &msg, 1);

if (ret != 1) {
Expand Down Expand Up @@ -590,7 +590,7 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
if (fe->ops.tuner_ops.sleep)
fe->ops.tuner_ops.sleep(fe);

ops->i2c_gate_ctrl(fe, 0);
analog_ops->i2c_gate_ctrl(fe, 0);

return 0;
}
Expand Down Expand Up @@ -635,7 +635,7 @@ static int tda8295_probe(struct tuner_i2c_props *i2c_props)
return -ENODEV;
}

static struct analog_tuner_ops tda8290_tuner_ops = {
static struct analog_demod_ops tda8290_ops = {
.info = {
.name = "TDA8290",
},
Expand All @@ -646,7 +646,7 @@ static struct analog_tuner_ops tda8290_tuner_ops = {
.i2c_gate_ctrl = tda8290_i2c_bridge,
};

static struct analog_tuner_ops tda8295_tuner_ops = {
static struct analog_demod_ops tda8295_ops = {
.info = {
.name = "TDA8295",
},
Expand Down Expand Up @@ -678,12 +678,14 @@ struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,

if (tda8290_probe(&priv->i2c_props) == 0) {
priv->ver = TDA8290;
fe->ops.analog_demod_ops = &tda8290_tuner_ops;
memcpy(&fe->ops.analog_ops, &tda8290_ops,
sizeof(struct analog_demod_ops));
}

if (tda8295_probe(&priv->i2c_props) == 0) {
priv->ver = TDA8295;
fe->ops.analog_demod_ops = &tda8295_tuner_ops;
memcpy(&fe->ops.analog_ops, &tda8295_ops,
sizeof(struct analog_demod_ops));
}

if (tda829x_find_tuner(fe) < 0)
Expand Down Expand Up @@ -723,7 +725,6 @@ struct dvb_frontend *tda829x_attach(struct dvb_frontend *fe,

fail:
tda829x_release(fe);
fe->ops.analog_demod_ops = NULL;
return NULL;
}
EXPORT_SYMBOL_GPL(tda829x_attach);
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/media/video/tda9887.c
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,7 @@ static void tda9887_release(struct dvb_frontend *fe)
fe->analog_demod_priv = NULL;
}

static struct analog_tuner_ops tda9887_tuner_ops = {
static struct analog_demod_ops tda9887_ops = {
.info = {
.name = "TDA9887",
},
Expand Down Expand Up @@ -677,7 +677,8 @@ struct dvb_frontend *tda9887_attach(struct dvb_frontend *fe,

tuner_info("tda988[5/6/7] found\n");

fe->ops.analog_demod_ops = &tda9887_tuner_ops;
memcpy(&fe->ops.analog_ops, &tda9887_ops,
sizeof(struct analog_demod_ops));

return fe;
}
Expand Down
Loading

0 comments on commit 0db548c

Please sign in to comment.