summaryrefslogtreecommitdiffstats
path: root/drivers/media/common/tuners
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-05 13:53:39 +0100
committerIngo Molnar <mingo@elte.hu>2009-01-05 13:53:39 +0100
commit5359c32eb7402124abc9964d5d53639fe0739cea (patch)
treed77b6967fe8420678bb9d1d936855ac0699c196a /drivers/media/common/tuners
parent8916edef5888c5d8fe283714416a9ca95b4c3431 (diff)
parentfe0bdec68b77020281dc814805edfe594ae89e0f (diff)
downloadblackbird-obmc-linux-5359c32eb7402124abc9964d5d53639fe0739cea.tar.gz
blackbird-obmc-linux-5359c32eb7402124abc9964d5d53639fe0739cea.zip
Merge branch 'linus' into sched/urgent
Diffstat (limited to 'drivers/media/common/tuners')
-rw-r--r--drivers/media/common/tuners/tuner-simple.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c
index fb3f3b3adaba..de7adaf5fa5b 100644
--- a/drivers/media/common/tuners/tuner-simple.c
+++ b/drivers/media/common/tuners/tuner-simple.c
@@ -820,6 +820,15 @@ static u32 simple_dvb_configure(struct dvb_frontend *fe, u8 *buf,
int ret;
unsigned frequency = params->frequency / 62500;
+ if (!tun->stepsize) {
+ /* tuner-core was loaded before the digital tuner was
+ * configured and somehow picked the wrong tuner type */
+ tuner_err("attempt to treat tuner %d (%s) as digital tuner "
+ "without stepsize defined.\n",
+ priv->type, priv->tun->name);
+ return 0; /* failure */
+ }
+
t_params = simple_tuner_params(fe, TUNER_PARAM_TYPE_DIGITAL);
ret = simple_config_lookup(fe, t_params, &frequency, &config, &cb);
if (ret < 0)
@@ -1059,7 +1068,12 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
memcpy(&fe->ops.tuner_ops, &simple_tuner_ops,
sizeof(struct dvb_tuner_ops));
- tuner_info("type set to %d (%s)\n", type, priv->tun->name);
+ if (type != priv->type)
+ tuner_warn("couldn't set type to %d. Using %d (%s) instead\n",
+ type, priv->type, priv->tun->name);
+ else
+ tuner_info("type set to %d (%s)\n",
+ priv->type, priv->tun->name);
if ((debug) || ((atv_input[priv->nr] > 0) ||
(dtv_input[priv->nr] > 0))) {
OpenPOWER on IntegriCloud