Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366907
b: refs/heads/master
c: 38a46c2
h: refs/heads/master
i:
  366905: 22946a6
  366903: 87a48de
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Mar 29, 2013
1 parent fc90d08 commit df3ac8e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 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: 30bac9110455402fa8888740c6819dd3daa2666f
refs/heads/master: 38a46c2128ade2a0c6ee4438297180b09a01c309
20 changes: 10 additions & 10 deletions trunk/drivers/media/radio/radio-si476x.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ static int si476x_radio_g_tuner(struct file *file, void *priv,
}

static int si476x_radio_s_tuner(struct file *file, void *priv,
struct v4l2_tuner *tuner)
const struct v4l2_tuner *tuner)
{
struct si476x_radio *radio = video_drvdata(file);

Expand Down Expand Up @@ -699,15 +699,16 @@ static int si476x_radio_g_frequency(struct file *file, void *priv,
}

static int si476x_radio_s_frequency(struct file *file, void *priv,
struct v4l2_frequency *f)
const struct v4l2_frequency *f)
{
int err;
u32 freq = f->frequency;
struct si476x_tune_freq_args args;
struct si476x_radio *radio = video_drvdata(file);

const u32 midrange = (si476x_bands[SI476X_BAND_AM].rangehigh +
si476x_bands[SI476X_BAND_FM].rangelow) / 2;
const int band = (f->frequency > midrange) ?
const int band = (freq > midrange) ?
SI476X_BAND_FM : SI476X_BAND_AM;
const enum si476x_func func = (band == SI476X_BAND_AM) ?
SI476X_FUNC_AM_RECEIVER : SI476X_FUNC_FM_RECEIVER;
Expand All @@ -718,11 +719,11 @@ static int si476x_radio_s_frequency(struct file *file, void *priv,

si476x_core_lock(radio->core);

f->frequency = clamp(f->frequency,
si476x_bands[band].rangelow,
si476x_bands[band].rangehigh);
freq = clamp(freq,
si476x_bands[band].rangelow,
si476x_bands[band].rangehigh);

if (si476x_radio_freq_is_inside_of_the_band(f->frequency,
if (si476x_radio_freq_is_inside_of_the_band(freq,
SI476X_BAND_AM) &&
(!si476x_core_has_am(radio->core) ||
si476x_core_is_a_secondary_tuner(radio->core))) {
Expand All @@ -737,8 +738,7 @@ static int si476x_radio_s_frequency(struct file *file, void *priv,
args.zifsr = false;
args.hd = false;
args.injside = SI476X_INJSIDE_AUTO;
args.freq = v4l2_to_si476x(radio->core,
f->frequency);
args.freq = v4l2_to_si476x(radio->core, freq);
args.tunemode = SI476X_TM_VALIDATED_NORMAL_TUNE;
args.smoothmetrics = SI476X_SM_INITIALIZE_AUDIO;
args.antcap = 0;
Expand Down Expand Up @@ -1046,7 +1046,7 @@ static int si476x_radio_g_register(struct file *file, void *fh,
return err;
}
static int si476x_radio_s_register(struct file *file, void *fh,
struct v4l2_dbg_register *reg)
const struct v4l2_dbg_register *reg)
{

int err;
Expand Down

0 comments on commit df3ac8e

Please sign in to comment.