stagine/easycap: use module paramter for default encoding instead of ifdef
authorTomas Winkler <tomas.winkler@intel.com>
Tue, 8 Feb 2011 23:12:42 +0000 (01:12 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Feb 2011 19:59:05 +0000 (11:59 -0800)
remove PREFER_NTSC ifdef as it cannot be possible put into Kconfig

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/easycap/easycap.h
drivers/staging/easycap/easycap_main.c

index da77e3ee62309fa59e78ad8b3f2a7884fa33d51d..00669b60aa4266878cbc6e1d163bd7b04147966a 100644 (file)
@@ -49,7 +49,6 @@
  */
 /*---------------------------------------------------------------------------*/
 #define  PATIENCE  500
-#undef   PREFER_NTSC
 #define  PERSEVERE
 /*---------------------------------------------------------------------------*/
 /*
index 4385236b288347f305e1ebea3ee98cf7edeadfd1..2887f014274be20fa18eb69ff0e564c3d756fc95 100644 (file)
@@ -51,6 +51,10 @@ static int easycap_gain = 16;
 module_param_named(gain, easycap_gain, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(gain, "Audio gain: 0,...,16(default),...31");
 
+static bool easycap_ntsc;
+module_param_named(ntsc, easycap_ntsc, bool, S_IRUGO | S_IWUSR);
+MODULE_PARM_DESC(ntsc, "NTCS default encoding (default PAL)");
+
 
 
 struct easycap_dongle easycapdc60_dongle[DONGLE_MANY];
@@ -4102,13 +4106,9 @@ static int easycap_usb_probe(struct usb_interface *pusb_interface,
  *  BEWARE.
 */
 /*---------------------------------------------------------------------------*/
-#ifdef PREFER_NTSC
-               peasycap->ntsc = true;
-               JOM(8, "defaulting initially to NTSC\n");
-#else
-               peasycap->ntsc = false;
-               JOM(8, "defaulting initially to PAL\n");
-#endif /*PREFER_NTSC*/
+               peasycap->ntsc = easycap_ntsc;
+               JOM(8, "defaulting initially to %s\n",
+                       easycap_ntsc ? "NTSC" : "PAL");
                rc = reset(peasycap);
                if (rc) {
                        SAM("ERROR: reset() returned %i\n", rc);