All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@redhat.com>
To: unlisted-recipients:; (no To-header on input)@casper.infradead.org
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>
Subject: [PATCH 05/14] [media] tuner-core: move some messages to the proper place
Date: Mon, 14 Feb 2011 19:03:13 -0200	[thread overview]
Message-ID: <20110214190313.72a4591a@pedra> (raw)
In-Reply-To: <cover.1297716906.git.mchehab@redhat.com>

Move the frequency set debug printk's to the code that actually
are changing it.

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

diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 912d8e8..f497f52 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -246,6 +246,9 @@ static void set_tv_freq(struct i2c_client *c, unsigned int freq)
 			freq = tv_range[1] * 16;
 	}
 	params.frequency = freq;
+	tuner_dbg("tv freq set to %lu.%02lu\n",
+			freq / 16, freq % 16 * 100 / 16);
+	t->tv_freq = freq;
 
 	analog_ops->set_params(&t->fe, &params);
 }
@@ -281,6 +284,9 @@ static void set_radio_freq(struct i2c_client *c, unsigned int freq)
 			freq = radio_range[1] * 16000;
 	}
 	params.frequency = freq;
+	tuner_dbg("radio freq set to %lu.%02lu\n",
+			freq / 16000, freq % 16000 * 100 / 16000);
+	t->radio_freq = freq;
 
 	analog_ops->set_params(&t->fe, &params);
 }
@@ -291,17 +297,11 @@ static void set_freq(struct i2c_client *c, unsigned long freq)
 
 	switch (t->mode) {
 	case V4L2_TUNER_RADIO:
-		tuner_dbg("radio freq set to %lu.%02lu\n",
-			  freq / 16000, freq % 16000 * 100 / 16000);
 		set_radio_freq(c, freq);
-		t->radio_freq = freq;
 		break;
 	case V4L2_TUNER_ANALOG_TV:
 	case V4L2_TUNER_DIGITAL_TV:
-		tuner_dbg("tv freq set to %lu.%02lu\n",
-			  freq / 16, freq % 16 * 100 / 16);
 		set_tv_freq(c, freq);
-		t->tv_freq = freq;
 		break;
 	default:
 		tuner_dbg("freq set: unknown mode: 0x%04x!\n",t->mode);
-- 
1.7.1



  parent reply	other threads:[~2011-02-14 21:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1297716906.git.mchehab@redhat.com>
2011-02-14 21:03 ` [PATCH 03/14] [media] tuner-core: Remove V4L1/V4L2 API switch Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 04/14] [media] tuner-core: remove the legacy is_stereo() call Mauro Carvalho Chehab
2011-02-14 21:03 ` Mauro Carvalho Chehab [this message]
2011-02-14 21:03 ` [PATCH 06/14] [media] tuner-core: Reorganize the functions internally Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 07/14] [media] tuner-core: Some cleanups at check_mode/set_mode Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 08/14] [media] tuner-core: Better implement standby mode Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 09/14] [media] tuner-core: do the right thing for suspend/resume Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 10/14] [media] tuner-core: CodingStyle cleanups Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 11/14] [media] tuner-core: Don't use a static var for xc5000_cfg Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 01/14] [media] cx88: use unlocked_ioctl for cx88-video Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 02/14] [media] cx88: Don't allow opening a device while it is not ready Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 14/14] [media] Remove the remaining usages for T_STANDBY Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 12/14] [media] tuner-core: dead code removal Mauro Carvalho Chehab
2011-02-14 21:03 ` [PATCH 13/14] [media] tuner-core: Fix a few comments on it Mauro Carvalho Chehab
2011-02-14 21:49 ` [PATCH 01/14] [media] cx88: use unlocked_ioctl for cx88-video Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110214190313.72a4591a@pedra \
    --to=mchehab@redhat.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.