]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/media/video/tuner-core.c
[PATCH] v4l-944-added-driver-for-saa7127-video-tidy
[linux-2.6-omap-h63xx.git] / drivers / media / video / tuner-core.c
index fce18638134a18d6ef2666bb0f2691afff673afc..e58abdfcaab8bcfc5c64adf572fb55818ef785a5 100644 (file)
@@ -222,9 +222,9 @@ static void set_addr(struct i2c_client *c, struct tuner_setup *tun_setup)
 {
        struct tuner *t = i2c_get_clientdata(c);
 
-       if ((tun_setup->addr == ADDR_UNSET &&
+       if ( t->type == UNSET && ((tun_setup->addr == ADDR_UNSET &&
                (t->mode_mask & tun_setup->mode_mask)) ||
-               tun_setup->addr == c->addr) {
+               tun_setup->addr == c->addr)) {
                        set_type(c, tun_setup->type, tun_setup->mode_mask);
        }
 }
@@ -251,7 +251,7 @@ static inline int check_mode(struct tuner *t, char *cmd)
 
 static char pal[] = "-";
 module_param_string(pal, pal, sizeof(pal), 0644);
-static char secam[] = "-";
+static char secam[] = "--";
 module_param_string(secam, secam, sizeof(secam), 0644);
 
 /* get more precise norm info from insmod option */
@@ -307,8 +307,13 @@ static int tuner_fixup_std(struct tuner *t)
                        break;
                case 'l':
                case 'L':
-                       tuner_dbg ("insmod fixup: SECAM => SECAM-L\n");
-                       t->std = V4L2_STD_SECAM_L;
+                       if ((secam[1]=='C')||(secam[1]=='c')) {
+                               tuner_dbg ("insmod fixup: SECAM => SECAM-L'\n");
+                               t->std = V4L2_STD_SECAM_LC;
+                       } else {
+                               tuner_dbg ("insmod fixup: SECAM => SECAM-L\n");
+                               t->std = V4L2_STD_SECAM_L;
+                       }
                        break;
                case '-':
                        /* default parameter, do nothing */
@@ -369,7 +374,7 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
                        /* If chip is not tda8290, don't register.
                           since it can be tda9887*/
                        if (tda8290_probe(&t->i2c) != 0) {
-                               tuner_dbg("chip at addr %x is not a tda8290\n", addr);
+                               tuner_dbg("chip at addr %x is not a tda8290\n", addr);
                                kfree(t);
                                return 0;
                        }
@@ -497,8 +502,6 @@ static int tuner_command(struct i2c_client *client, unsigned int cmd, void *arg)
                        break;
                }
        case AUDC_CONFIG_PINNACLE:
-               if (check_mode(t, "AUDC_CONFIG_PINNACLE") == EINVAL)
-                       return 0;
                switch (*iarg) {
                case 2:
                        tuner_dbg("pinnacle pal\n");