public inbox for linux-media@vger.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 03/14] [media] tuner-core: Remove V4L1/V4L2 API switch
Date: Mon, 14 Feb 2011 19:03:11 -0200	[thread overview]
Message-ID: <20110214190311.545e34ba@pedra> (raw)
In-Reply-To: <cover.1297716906.git.mchehab@redhat.com>

V4L1 was removed. So, the code there is just dead code.

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 1cec122..6041c7d 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -80,7 +80,6 @@ struct tuner {
 	struct i2c_client   *i2c;
 	struct v4l2_subdev  sd;
 	struct list_head    list;
-	unsigned int        using_v4l2:1;
 
 	/* keep track of the current settings */
 	v4l2_std_id         std;
@@ -717,19 +716,6 @@ static inline int set_mode(struct i2c_client *client, struct tuner *t, int mode,
 	return 0;
 }
 
-#define switch_v4l2()	if (!t->using_v4l2) \
-			    tuner_dbg("switching to v4l2\n"); \
-			t->using_v4l2 = 1;
-
-static inline int check_v4l2(struct tuner *t)
-{
-	/* bttv still uses both v4l1 and v4l2 calls to the tuner (v4l2 for
-	   TV, v4l1 for radio), until that is fixed this code is disabled.
-	   Otherwise the radio (v4l1) wouldn't tune after using the TV (v4l2)
-	   first. */
-	return 0;
-}
-
 static int tuner_s_type_addr(struct v4l2_subdev *sd, struct tuner_setup *type)
 {
 	struct tuner *t = to_tuner(sd);
@@ -803,8 +789,6 @@ static int tuner_s_std(struct v4l2_subdev *sd, v4l2_std_id std)
 	if (set_mode(client, t, V4L2_TUNER_ANALOG_TV, "s_std") == -EINVAL)
 		return 0;
 
-	switch_v4l2();
-
 	t->std = std;
 	tuner_fixup_std(t);
 	if (t->tv_freq)
@@ -819,7 +803,6 @@ static int tuner_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
 
 	if (set_mode(client, t, f->type, "s_frequency") == -EINVAL)
 		return 0;
-	switch_v4l2();
 	set_freq(client, f->frequency);
 
 	return 0;
@@ -832,7 +815,6 @@ static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f)
 
 	if (check_mode(t, "g_frequency") == -EINVAL)
 		return 0;
-	switch_v4l2();
 	f->type = t->mode;
 	if (fe_tuner_ops->get_frequency) {
 		u32 abs_freq;
@@ -856,7 +838,6 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
 
 	if (check_mode(t, "g_tuner") == -EINVAL)
 		return 0;
-	switch_v4l2();
 
 	vt->type = t->mode;
 	if (analog_ops->get_afc)
@@ -906,8 +887,6 @@ static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt)
 	if (check_mode(t, "s_tuner") == -EINVAL)
 		return 0;
 
-	switch_v4l2();
-
 	/* do nothing unless we're a radio tuner */
 	if (t->mode != V4L2_TUNER_RADIO)
 		return 0;
-- 
1.7.1



       reply	other threads:[~2011-02-14 21:03 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 ` Mauro Carvalho Chehab [this message]
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 ` [PATCH 05/14] [media] tuner-core: move some messages to the proper place Mauro Carvalho Chehab
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 09/14] [media] tuner-core: do the right thing for suspend/resume 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 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=20110214190311.545e34ba@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox