Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 285638
b: refs/heads/master
c: 3d49700
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Jan 5, 2012
1 parent 6f86328 commit d5b7a0e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 33 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: fad11dbc936cfd8483235f955b54636447a4425d
refs/heads/master: 3d49700fb162a3bc8e21bf3f304346d2e6269b3a
44 changes: 13 additions & 31 deletions trunk/drivers/media/common/tuners/mt2063.c
Original file line number Diff line number Diff line change
Expand Up @@ -320,53 +320,34 @@ static u32 MT2063_SoftwareShutdown(struct mt2063_state *state, u8 Shutdown);
static u32 MT2063_ClearPowerMaskBits(struct mt2063_state *state, enum MT2063_Mask_Bits Bits);


/*****************/
/* From drivers/media/common/tuners/mt2063_cfg.h */


/*
* Ancillary routines visible outside mt2063
*/
unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe)
{
struct mt2063_state *state = fe->tuner_priv;
struct dvb_frontend_ops *frontend_ops = &fe->ops;
struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
int err = 0;

if (&fe->ops)
frontend_ops = &fe->ops;
if (&frontend_ops->tuner_ops)
tuner_ops = &frontend_ops->tuner_ops;
if (tuner_ops->set_state) {
err = MT2063_SoftwareShutdown(state, 1);
if (err < 0) {
printk("%s: Invalid parameter\n", __func__);
return err;
}
}
err = MT2063_SoftwareShutdown(state, 1);
if (err < 0)
printk(KERN_ERR "%s: Couldn't shutdown\n", __func__);

return err;
}
EXPORT_SYMBOL_GPL(tuner_MT2063_SoftwareShutdown);

unsigned int tuner_MT2063_ClearPowerMaskBits(struct dvb_frontend *fe)
{
struct mt2063_state *state = fe->tuner_priv;
struct dvb_frontend_ops *frontend_ops = &fe->ops;
struct dvb_tuner_ops *tuner_ops = &frontend_ops->tuner_ops;
int err = 0;

if (&fe->ops)
frontend_ops = &fe->ops;
if (&frontend_ops->tuner_ops)
tuner_ops = &frontend_ops->tuner_ops;
if (tuner_ops->set_state) {
err = MT2063_ClearPowerMaskBits(state, MT2063_ALL_SD);
if (err < 0) {
printk("%s: Invalid parameter\n", __func__);
return err;
}
}
err = MT2063_ClearPowerMaskBits(state, MT2063_ALL_SD);
if (err < 0)
printk(KERN_ERR "%s: Invalid parameter\n", __func__);

return err;
}
EXPORT_SYMBOL_GPL(tuner_MT2063_ClearPowerMaskBits);

/*
* mt2063_write - Write data into the I2C bus
Expand Down Expand Up @@ -1173,6 +1154,7 @@ unsigned int mt2063_lockStatus(struct mt2063_state *state)
*/
return 0;
}
EXPORT_SYMBOL_GPL(mt2063_lockStatus);

/****************************************************************************
**
Expand Down Expand Up @@ -3333,8 +3315,8 @@ struct dvb_frontend *mt2063_attach(struct dvb_frontend *fe,
kfree(state);
return NULL;
}
EXPORT_SYMBOL_GPL(mt2063_attach);

EXPORT_SYMBOL(mt2063_attach);
MODULE_PARM_DESC(verbose, "Set Verbosity level");

MODULE_AUTHOR("Henry");
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/common/tuners/mt2063.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ unsigned int mt2063_setTune(struct dvb_frontend *fe, u32 f_in,
u32 bw_in,
enum MTTune_atv_standard tv_type);

/* FIXME: Should use the standard DVB attachment interfaces */
unsigned int mt2063_lockStatus(struct dvb_frontend *fe);
unsigned int tuner_MT2063_Open(struct dvb_frontend *fe);
unsigned int tuner_MT2063_SoftwareShutdown(struct dvb_frontend *fe);
unsigned int tuner_MT2063_ClearPowerMaskBits(struct dvb_frontend *fe);

Expand Down

0 comments on commit d5b7a0e

Please sign in to comment.