Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92489
b: refs/heads/master
c: a2a7f84
h: refs/heads/master
i:
  92487: 45768b6
v: v3
  • Loading branch information
Michael Krufky authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 0a36b5f commit 27320f2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: 26cd8972fb5cf673489005bf9b7d16e6f273422b
refs/heads/master: a2a7f84b7908c6dba998b43a1ed343aff1d2fd98
14 changes: 6 additions & 8 deletions trunk/drivers/media/video/tuner-simple.c
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,10 @@ static void simple_set_dvb(struct dvb_frontend *fe, u8 *buf,
}
}

static int simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
const struct dvb_frontend_parameters *params)
{
/* This function returns the tuned frequency on success, 0 on error */
struct tuner_simple_priv *priv = fe->tuner_priv;
struct tunertype *tun = priv->tun;
static struct tuner_params *t_params;
Expand All @@ -801,7 +802,7 @@ static int simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL);
ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb);
if (ret < 0)
return ret;
return 0; /* failure */

div = ((frequency + t_params->iffreq) * 62500 + offset +
tun->stepsize/2) / tun->stepsize;
Expand All @@ -825,17 +826,14 @@ static int simple_dvb_calc_regs(struct dvb_frontend *fe,
u8 *buf, int buf_len)
{
struct tuner_simple_priv *priv = fe->tuner_priv;
int ret;
u32 frequency;

if (buf_len < 5)
return -EINVAL;

ret = simple_dvb_configure(fe, buf+1, params);
if (ret < 0)
return ret;
else
frequency = ret;
frequency = simple_dvb_configure(fe, buf+1, params);
if (frequency == 0)
return -EINVAL;

buf[0] = priv->i2c_props.addr;

Expand Down

0 comments on commit 27320f2

Please sign in to comment.