From: Mauro Carvalho Chehab <mchehab@redhat.com>
Date: Wed, 31 Dec 2008 12:34:18 +0000 (-0300)
Subject: V4L/DVB (10162): tuner-simple: Fix tuner type set message
X-Git-Tag: v2.6.29-rc1~523^2~10
X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0b82c5d6748a15758875f78ac772c6d48ebead2a;p=linux-2.6-omap-h63xx.git

V4L/DVB (10162): tuner-simple: Fix tuner type set message

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
---

diff --git a/drivers/media/common/tuners/tuner-simple.c b/drivers/media/common/tuners/tuner-simple.c
index fb3f3b3adab..1a21191566f 100644
--- a/drivers/media/common/tuners/tuner-simple.c
+++ b/drivers/media/common/tuners/tuner-simple.c
@@ -1059,7 +1059,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))) {