- Add MODULE_PARM_DESC for most parameters
- Use 2.6-style module_param (merge from v4l tree)
The motivation for this patch was to eliminate the slightly
scary-looking "Ignoring new-style parameters in presence of obsolete
ones" kernel message upon loading tuner.ko. I haven't tested all
codepaths, but it compiles on my 2.6.12 system.
Cheers,
Phil
--- ivtv-0.3.7h.orig/driver/tuner.c 2005-08-16 12:31:30.000000000 +0100
+++ ivtv-0.3.7h/driver/tuner.c 2005-08-22 04:20:42.000000000 +0100
@@ -40,6 +40,9 @@
static unsigned int tv_antenna = 1;
static unsigned int radio_antenna = 0;
static unsigned int no_autodetect = 0;
+static char pal[] = "-";
+
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 0)
MODULE_PARM(no_autodetect, "i");
MODULE_PARM(debug, "i");
MODULE_PARM(type, "i");
@@ -48,6 +51,33 @@
MODULE_PARM(radio_range, "2i");
MODULE_PARM(tv_antenna, "i");
MODULE_PARM(radio_antenna, "i");
+MODULE_PARM(pal, "s");
+#else
+module_param(no_autodetect, int, 0444);
+module_param(debug, int, 0644);
+module_param(type, int, 0444);
+module_param(addr, int, 0444);
+module_param(tv_antenna, int, 0444);
+module_param(radio_antenna, int, 0444);
+module_param_string(pal, pal, sizeof(pal), 0644);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 10)
+module_param_array(tv_range, int, NULL, 0644);
+module_param_array(radio_range, int, NULL, 0644);
+#else
+static unsigned int dummy = 0;
+module_param_array(tv_range, int, dummy, 0644);
+module_param_array(radio_range, int, dummy, 0644);
+#endif /* LINUX VERSION CODE >= 2.6.10 */
+#endif /* LINUX_VERSION_CODE < 2.6.0 */
+
+MODULE_PARM_DESC(debug, "Debug level (0-1)");
+MODULE_PARM_DESC(pal, "Type of PAL signal (b,g,i,d,k)");
+MODULE_PARM_DESC(no_autodetect, "Disable TEA5767 autodetection (0-1)");
+MODULE_PARM_DESC(addr, "Override i2c address to scan");
+MODULE_PARM_DESC(tv_range, \
+ "start,end permitted frequency range for TV, in MHz");
+MODULE_PARM_DESC(radio_range, \
+ "start,end permitted frequency range for radio, in MHz");
#define optimize_vco 1
@@ -1502,9 +1532,6 @@
}
}
-static char *pal = "-";
-MODULE_PARM(pal, "s");
-
static int tuner_fixup_std(struct tuner *t)
{
if ((t->std & V4L2_STD_PAL) == V4L2_STD_PAL) {