diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-09-10 03:09:51 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-09-10 03:09:51 -0400 |
commit | 6003ab0bad4cc56f3c4fadf62a0d23a967b9c53b (patch) | |
tree | 2087ca69776116b70a6af0daae9c10bfac1aa347 /drivers/media/common/tuners/tuner-simple.c | |
parent | ab7476cf76e560f0efda2a631a70aabe93009025 (diff) | |
parent | adee14b2e1557d0a8559f29681732d05a89dfc35 (diff) |
Merge branch 'linus' into core/debug
Conflicts:
lib/vsprintf.c
Manual merge:
include/linux/kernel.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/media/common/tuners/tuner-simple.c')
-rw-r--r-- | drivers/media/common/tuners/tuner-simple.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c index 597e47f5d69c..aa773a658a2a 100644 --- a/drivers/media/common/tuners/tuner-simple.c +++ b/drivers/media/common/tuners/tuner-simple.c | |||
@@ -253,7 +253,7 @@ static struct tuner_params *simple_tuner_params(struct dvb_frontend *fe, | |||
253 | 253 | ||
254 | static int simple_config_lookup(struct dvb_frontend *fe, | 254 | static int simple_config_lookup(struct dvb_frontend *fe, |
255 | struct tuner_params *t_params, | 255 | struct tuner_params *t_params, |
256 | int *frequency, u8 *config, u8 *cb) | 256 | unsigned *frequency, u8 *config, u8 *cb) |
257 | { | 257 | { |
258 | struct tuner_simple_priv *priv = fe->tuner_priv; | 258 | struct tuner_simple_priv *priv = fe->tuner_priv; |
259 | int i; | 259 | int i; |
@@ -587,45 +587,45 @@ static int simple_set_tv_freq(struct dvb_frontend *fe, | |||
587 | priv->last_div = div; | 587 | priv->last_div = div; |
588 | if (t_params->has_tda9887) { | 588 | if (t_params->has_tda9887) { |
589 | struct v4l2_priv_tun_config tda9887_cfg; | 589 | struct v4l2_priv_tun_config tda9887_cfg; |
590 | int config = 0; | 590 | int tda_config = 0; |
591 | int is_secam_l = (params->std & (V4L2_STD_SECAM_L | | 591 | int is_secam_l = (params->std & (V4L2_STD_SECAM_L | |
592 | V4L2_STD_SECAM_LC)) && | 592 | V4L2_STD_SECAM_LC)) && |
593 | !(params->std & ~(V4L2_STD_SECAM_L | | 593 | !(params->std & ~(V4L2_STD_SECAM_L | |
594 | V4L2_STD_SECAM_LC)); | 594 | V4L2_STD_SECAM_LC)); |
595 | 595 | ||
596 | tda9887_cfg.tuner = TUNER_TDA9887; | 596 | tda9887_cfg.tuner = TUNER_TDA9887; |
597 | tda9887_cfg.priv = &config; | 597 | tda9887_cfg.priv = &tda_config; |
598 | 598 | ||
599 | if (params->std == V4L2_STD_SECAM_LC) { | 599 | if (params->std == V4L2_STD_SECAM_LC) { |
600 | if (t_params->port1_active ^ t_params->port1_invert_for_secam_lc) | 600 | if (t_params->port1_active ^ t_params->port1_invert_for_secam_lc) |
601 | config |= TDA9887_PORT1_ACTIVE; | 601 | tda_config |= TDA9887_PORT1_ACTIVE; |
602 | if (t_params->port2_active ^ t_params->port2_invert_for_secam_lc) | 602 | if (t_params->port2_active ^ t_params->port2_invert_for_secam_lc) |
603 | config |= TDA9887_PORT2_ACTIVE; | 603 | tda_config |= TDA9887_PORT2_ACTIVE; |
604 | } else { | 604 | } else { |
605 | if (t_params->port1_active) | 605 | if (t_params->port1_active) |
606 | config |= TDA9887_PORT1_ACTIVE; | 606 | tda_config |= TDA9887_PORT1_ACTIVE; |
607 | if (t_params->port2_active) | 607 | if (t_params->port2_active) |
608 | config |= TDA9887_PORT2_ACTIVE; | 608 | tda_config |= TDA9887_PORT2_ACTIVE; |
609 | } | 609 | } |
610 | if (t_params->intercarrier_mode) | 610 | if (t_params->intercarrier_mode) |
611 | config |= TDA9887_INTERCARRIER; | 611 | tda_config |= TDA9887_INTERCARRIER; |
612 | if (is_secam_l) { | 612 | if (is_secam_l) { |
613 | if (i == 0 && t_params->default_top_secam_low) | 613 | if (i == 0 && t_params->default_top_secam_low) |
614 | config |= TDA9887_TOP(t_params->default_top_secam_low); | 614 | tda_config |= TDA9887_TOP(t_params->default_top_secam_low); |
615 | else if (i == 1 && t_params->default_top_secam_mid) | 615 | else if (i == 1 && t_params->default_top_secam_mid) |
616 | config |= TDA9887_TOP(t_params->default_top_secam_mid); | 616 | tda_config |= TDA9887_TOP(t_params->default_top_secam_mid); |
617 | else if (t_params->default_top_secam_high) | 617 | else if (t_params->default_top_secam_high) |
618 | config |= TDA9887_TOP(t_params->default_top_secam_high); | 618 | tda_config |= TDA9887_TOP(t_params->default_top_secam_high); |
619 | } else { | 619 | } else { |
620 | if (i == 0 && t_params->default_top_low) | 620 | if (i == 0 && t_params->default_top_low) |
621 | config |= TDA9887_TOP(t_params->default_top_low); | 621 | tda_config |= TDA9887_TOP(t_params->default_top_low); |
622 | else if (i == 1 && t_params->default_top_mid) | 622 | else if (i == 1 && t_params->default_top_mid) |
623 | config |= TDA9887_TOP(t_params->default_top_mid); | 623 | tda_config |= TDA9887_TOP(t_params->default_top_mid); |
624 | else if (t_params->default_top_high) | 624 | else if (t_params->default_top_high) |
625 | config |= TDA9887_TOP(t_params->default_top_high); | 625 | tda_config |= TDA9887_TOP(t_params->default_top_high); |
626 | } | 626 | } |
627 | if (t_params->default_pll_gating_18) | 627 | if (t_params->default_pll_gating_18) |
628 | config |= TDA9887_GATING_18; | 628 | tda_config |= TDA9887_GATING_18; |
629 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, | 629 | i2c_clients_command(priv->i2c_props.adap, TUNER_SET_CONFIG, |
630 | &tda9887_cfg); | 630 | &tda9887_cfg); |
631 | } | 631 | } |
@@ -813,7 +813,8 @@ static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf, | |||
813 | static struct tuner_params *t_params; | 813 | static struct tuner_params *t_params; |
814 | u8 config, cb; | 814 | u8 config, cb; |
815 | u32 div; | 815 | u32 div; |
816 | int ret, frequency = params->frequency / 62500; | 816 | int ret; |
817 | unsigned frequency = params->frequency / 62500; | ||
817 | 818 | ||
818 | t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); | 819 | t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL); |
819 | ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); | 820 | ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb); |