Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92477
b: refs/heads/master
c: a81df36
h: refs/heads/master
i:
  92475: 7bae9b1
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent a45c8b5 commit 549de26
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 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: 62325497db6ef3b13cae41d5038e2693997d7d3e
refs/heads/master: a81df363554fb6439b5eb4ada06ad546a1df5ce3
17 changes: 15 additions & 2 deletions trunk/drivers/media/video/tuner-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,12 @@ static inline int tuner_afcstatus(const int status)
static int simple_get_status(struct dvb_frontend *fe, u32 *status)
{
struct tuner_simple_priv *priv = fe->tuner_priv;
int tuner_status = tuner_read_status(fe);
int tuner_status;

if (priv->i2c_props.adap == NULL)
return -EINVAL;

tuner_status = tuner_read_status(fe);

*status = 0;

Expand All @@ -166,7 +171,12 @@ static int simple_get_status(struct dvb_frontend *fe, u32 *status)
static int simple_get_rf_strength(struct dvb_frontend *fe, u16 *strength)
{
struct tuner_simple_priv *priv = fe->tuner_priv;
int signal = tuner_signal(tuner_read_status(fe));
int signal;

if (priv->i2c_props.adap == NULL)
return -EINVAL;

signal = tuner_signal(tuner_read_status(fe));

*strength = signal;

Expand Down Expand Up @@ -685,6 +695,9 @@ static int simple_set_params(struct dvb_frontend *fe,
struct tuner_simple_priv *priv = fe->tuner_priv;
int ret = -EINVAL;

if (priv->i2c_props.adap == NULL)
return -EINVAL;

switch (params->mode) {
case V4L2_TUNER_RADIO:
ret = simple_set_radio_freq(fe, params);
Expand Down

0 comments on commit 549de26

Please sign in to comment.