Merge branch 'upstream-fixes' into upstream
[pandora-kernel.git] / drivers / media / video / tuner-core.c
index a26ded7..40590ba 100644 (file)
@@ -40,7 +40,6 @@ static unsigned int no_autodetect = 0;
 static unsigned int show_i2c = 0;
 
 /* insmod options used at runtime => read/write */
-static unsigned int tuner_debug_old = 0;
 int tuner_debug = 0;
 
 static unsigned int tv_range[2] = { 44, 958 };
@@ -54,8 +53,6 @@ static char ntsc[] = "-";
 module_param(addr, int, 0444);
 module_param(no_autodetect, int, 0444);
 module_param(show_i2c, int, 0444);
-/* Note: tuner_debug is deprecated and will be removed in 2.6.17 */
-module_param_named(tuner_debug,tuner_debug_old, int, 0444);
 module_param_named(debug,tuner_debug, int, 0644);
 module_param_string(pal, pal, sizeof(pal), 0644);
 module_param_string(secam, secam, sizeof(secam), 0644);
@@ -199,14 +196,6 @@ static void set_type(struct i2c_client *c, unsigned int type,
                i2c_master_send(c, buffer, 4);
                default_tuner_init(c);
                break;
-       case TUNER_LG_TDVS_H06XF:
-               /* Set the Auxiliary Byte. */
-               buffer[2] &= ~0x20;
-               buffer[2] |= 0x18;
-               buffer[3] = 0x20;
-               i2c_master_send(c, buffer, 4);
-               default_tuner_init(c);
-               break;
        case TUNER_PHILIPS_TD1316:
                buffer[0] = 0x0b;
                buffer[1] = 0xdc;
@@ -419,7 +408,7 @@ static void tuner_status(struct i2c_client *client)
 
 /* ---------------------------------------------------------------------- */
 
-/* static var Used only in tuner_attach and tuner_probe */
+/* static vars: used only in tuner_attach and tuner_probe */
 static unsigned default_mode_mask;
 
 /* During client attach, set_type is called by adapter's attach_inform callback.
@@ -442,11 +431,6 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
        t->audmode = V4L2_TUNER_MODE_STEREO;
        t->mode_mask = T_UNINITIALIZED;
        t->tuner_status = tuner_status;
-       if (tuner_debug_old) {
-               tuner_debug = tuner_debug_old;
-               printk(KERN_ERR "tuner: tuner_debug is deprecated and will be removed in 2.6.17.\n");
-               printk(KERN_ERR "tuner: use the debug option instead.\n");
-       }
 
        if (show_i2c) {
                unsigned char buffer[16];
@@ -606,6 +590,7 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                if (t->standby)
                        t->standby (client);
                break;
+#ifdef CONFIG_VIDEO_V4L1
        case VIDIOCSAUDIO:
                if (check_mode(t, "VIDIOCSAUDIO") == EINVAL)
                        return 0;
@@ -615,17 +600,6 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                /* Should be implemented, since bttv calls it */
                tuner_dbg("VIDIOCSAUDIO not implemented.\n");
                break;
-       case TDA9887_SET_CONFIG:
-       {
-               int *i = arg;
-
-               t->tda9887_config = *i;
-               set_freq(client, t->tv_freq);
-               break;
-       }
-       /* --- v4l ioctls --- */
-       /* take care: bttv does userspace copying, we'll get a
-          kernel pointer here... */
        case VIDIOCSCHAN:
                {
                        static const v4l2_std_id map[] = {
@@ -709,7 +683,18 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                                    ? VIDEO_SOUND_STEREO : VIDEO_SOUND_MONO;
                        return 0;
                }
+#endif
+       case TDA9887_SET_CONFIG:
+               if (t->type == TUNER_TDA9887) {
+                       int *i = arg;
 
+                       t->tda9887_config = *i;
+                       set_freq(client, t->tv_freq);
+               }
+               break;
+       /* --- v4l ioctls --- */
+       /* take care: bttv does userspace copying, we'll get a
+          kernel pointer here... */
        case VIDIOC_S_STD:
                {
                        v4l2_std_id *id = arg;