Skip to content

Commit

Permalink
V4L/DVB (6839): tuner: add set_config to struct analog_tuner_ops
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent daae589 commit f1c9a28
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,27 @@ static int fe_has_signal(struct dvb_frontend *fe)
return strength;
}

static int fe_set_config(struct dvb_frontend *fe, void *priv_cfg)
{
struct dvb_tuner_ops *fe_tuner_ops = &fe->ops.tuner_ops;
struct tuner *t = fe->analog_demod_priv;

if (fe_tuner_ops->set_config)
return fe_tuner_ops->set_config(fe, priv_cfg);

tuner_warn("Tuner frontend module has no way to set config\n");

return 0;
}

static void tuner_status(struct dvb_frontend *fe);

static struct analog_tuner_ops tuner_core_ops = {
.set_params = fe_set_params,
.standby = fe_standby,
.release = fe_release,
.has_signal = fe_has_signal,
.set_config = fe_set_config,
.tuner_status = tuner_status
};

Expand Down
3 changes: 3 additions & 0 deletions drivers/media/video/tuner-driver.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ struct analog_tuner_ops {
void (*standby)(struct dvb_frontend *fe);
void (*release)(struct dvb_frontend *fe);
int (*i2c_gate_ctrl)(struct dvb_frontend *fe, int enable);

/** This is to allow setting tuner-specific configuration */
int (*set_config)(struct dvb_frontend *fe, void *priv_cfg);
};

struct tuner {
Expand Down

0 comments on commit f1c9a28

Please sign in to comment.