diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-02-03 20:05:23 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-03-21 19:32:00 -0400 |
commit | 5620094a2eaa6527d7f038ad3d65ce6a76c8272a (patch) | |
tree | 1c81708e4548161148d0c6347d2e98fa98007a5a /drivers/media/video | |
parent | 121ec13267fabcf2c81e4584f1505069e234b30d (diff) |
[media] tuner-core: Remove V4L1/V4L2 API switch
V4L1 was removed. So, the code there is just dead code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/tuner-core.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 1cec1224913f..6041c7d41189 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -80,7 +80,6 @@ struct tuner { | |||
80 | struct i2c_client *i2c; | 80 | struct i2c_client *i2c; |
81 | struct v4l2_subdev sd; | 81 | struct v4l2_subdev sd; |
82 | struct list_head list; | 82 | struct list_head list; |
83 | unsigned int using_v4l2:1; | ||
84 | 83 | ||
85 | /* keep track of the current settings */ | 84 | /* keep track of the current settings */ |
86 | v4l2_std_id std; | 85 | v4l2_std_id std; |
@@ -717,19 +716,6 @@ static inline int set_mode(struct i2c_client *client, struct tuner *t, int mode, | |||
717 | return 0; | 716 | return 0; |
718 | } | 717 | } |
719 | 718 | ||
720 | #define switch_v4l2() if (!t->using_v4l2) \ | ||
721 | tuner_dbg("switching to v4l2\n"); \ | ||
722 | t->using_v4l2 = 1; | ||
723 | |||
724 | static inline int check_v4l2(struct tuner *t) | ||
725 | { | ||
726 | /* bttv still uses both v4l1 and v4l2 calls to the tuner (v4l2 for | ||
727 | TV, v4l1 for radio), until that is fixed this code is disabled. | ||
728 | Otherwise the radio (v4l1) wouldn't tune after using the TV (v4l2) | ||
729 | first. */ | ||
730 | return 0; | ||
731 | } | ||
732 | |||
733 | static int tuner_s_type_addr(struct v4l2_subdev *sd, struct tuner_setup *type) | 719 | static int tuner_s_type_addr(struct v4l2_subdev *sd, struct tuner_setup *type) |
734 | { | 720 | { |
735 | struct tuner *t = to_tuner(sd); | 721 | struct tuner *t = to_tuner(sd); |
@@ -803,8 +789,6 @@ static int tuner_s_std(struct v4l2_subdev *sd, v4l2_std_id std) | |||
803 | if (set_mode(client, t, V4L2_TUNER_ANALOG_TV, "s_std") == -EINVAL) | 789 | if (set_mode(client, t, V4L2_TUNER_ANALOG_TV, "s_std") == -EINVAL) |
804 | return 0; | 790 | return 0; |
805 | 791 | ||
806 | switch_v4l2(); | ||
807 | |||
808 | t->std = std; | 792 | t->std = std; |
809 | tuner_fixup_std(t); | 793 | tuner_fixup_std(t); |
810 | if (t->tv_freq) | 794 | if (t->tv_freq) |
@@ -819,7 +803,6 @@ static int tuner_s_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) | |||
819 | 803 | ||
820 | if (set_mode(client, t, f->type, "s_frequency") == -EINVAL) | 804 | if (set_mode(client, t, f->type, "s_frequency") == -EINVAL) |
821 | return 0; | 805 | return 0; |
822 | switch_v4l2(); | ||
823 | set_freq(client, f->frequency); | 806 | set_freq(client, f->frequency); |
824 | 807 | ||
825 | return 0; | 808 | return 0; |
@@ -832,7 +815,6 @@ static int tuner_g_frequency(struct v4l2_subdev *sd, struct v4l2_frequency *f) | |||
832 | 815 | ||
833 | if (check_mode(t, "g_frequency") == -EINVAL) | 816 | if (check_mode(t, "g_frequency") == -EINVAL) |
834 | return 0; | 817 | return 0; |
835 | switch_v4l2(); | ||
836 | f->type = t->mode; | 818 | f->type = t->mode; |
837 | if (fe_tuner_ops->get_frequency) { | 819 | if (fe_tuner_ops->get_frequency) { |
838 | u32 abs_freq; | 820 | u32 abs_freq; |
@@ -856,7 +838,6 @@ static int tuner_g_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
856 | 838 | ||
857 | if (check_mode(t, "g_tuner") == -EINVAL) | 839 | if (check_mode(t, "g_tuner") == -EINVAL) |
858 | return 0; | 840 | return 0; |
859 | switch_v4l2(); | ||
860 | 841 | ||
861 | vt->type = t->mode; | 842 | vt->type = t->mode; |
862 | if (analog_ops->get_afc) | 843 | if (analog_ops->get_afc) |
@@ -906,8 +887,6 @@ static int tuner_s_tuner(struct v4l2_subdev *sd, struct v4l2_tuner *vt) | |||
906 | if (check_mode(t, "s_tuner") == -EINVAL) | 887 | if (check_mode(t, "s_tuner") == -EINVAL) |
907 | return 0; | 888 | return 0; |
908 | 889 | ||
909 | switch_v4l2(); | ||
910 | |||
911 | /* do nothing unless we're a radio tuner */ | 890 | /* do nothing unless we're a radio tuner */ |
912 | if (t->mode != V4L2_TUNER_RADIO) | 891 | if (t->mode != V4L2_TUNER_RADIO) |
913 | return 0; | 892 | return 0; |