[svn-commits] fjoe: freebsd/trunk r8346 - /freebsd/trunk/drivers/dahdi/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Mar 18 02:21:11 CDT 2010
Author: fjoe
Date: Thu Mar 18 02:21:05 2010
New Revision: 8346
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8346
Log:
Enable module parameters (visible as tunables on FreeBSD).
Modified:
freebsd/trunk/drivers/dahdi/dahdi-base.c
freebsd/trunk/drivers/dahdi/dahdi_dynamic.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_jpah.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_kb1.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_mg2.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_sec.c
freebsd/trunk/drivers/dahdi/dahdi_echocan_sec2.c
Modified: freebsd/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=8346&r1=8345&r2=8346
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi-base.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi-base.c Thu Mar 18 02:21:05 2010
@@ -58,6 +58,7 @@
#define FOP_WRITE_ARGS_DECL struct file *file, struct uio *uio, size_t count
#define FOP_WRITE_ARGS file, uio, count
+#define MODULE_PARAM_PREFIX "dahdi"
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -8909,6 +8910,9 @@
return 0;
}
+module_param(debug, int, 0644);
+module_param(deftaps, int, 0644);
+
#if defined(__FreeBSD__)
static void
init_file(struct file *file, struct cdev *dev, int ioflag)
@@ -9068,9 +9072,6 @@
* in the future, and users are encoruged to to rely on it. */
MODULE_ALIAS("dahdi_dummy");
MODULE_VERSION(DAHDI_VERSION);
-
-module_param(debug, int, 0644);
-module_param(deftaps, int, 0644);
static struct file_operations dahdi_fops = {
.owner = THIS_MODULE,
Modified: freebsd/trunk/drivers/dahdi/dahdi_dynamic.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_dynamic.c?view=diff&rev=8346&r1=8345&r2=8346
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_dynamic.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_dynamic.c Thu Mar 18 02:21:05 2010
@@ -31,6 +31,8 @@
#include <sys/module.h>
#include <sys/mutex.h>
#include <sys/systm.h>
+
+#define MODULE_PARAM_PREFIX "dahdi.dynamic"
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -839,6 +841,8 @@
printk(KERN_INFO "DAHDI Dynamic Span support unloaded\n");
}
+module_param(debug, int, 0600);
+
#if defined(__FreeBSD__)
static int
dahdi_dynamic_modevent(module_t mod __unused, int type, void *data __unused)
@@ -858,8 +862,6 @@
MODULE_VERSION(dahdi_dynamic, 1);
MODULE_DEPEND(dahdi_dynamic, dahdi, 1, 1, 1);
#else /* !__FreeBSD__ */
-module_param(debug, int, 0600);
-
MODULE_DESCRIPTION("DAHDI Dynamic Span Support");
MODULE_AUTHOR("Mark Spencer <markster at digium.com>");
MODULE_LICENSE("GPL v2");
Modified: freebsd/trunk/drivers/dahdi/dahdi_echocan_jpah.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_echocan_jpah.c?view=diff&rev=8346&r1=8345&r2=8346
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_echocan_jpah.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_echocan_jpah.c Thu Mar 18 02:21:05 2010
@@ -37,6 +37,7 @@
#define module_printk(level, fmt, args...) printf(fmt, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printf("%s: " fmt, __FUNCTION__, ## args)
+#define MODULE_PARAM_PREFIX "dahdi.echocan.jpah"
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/errno.h>
@@ -47,11 +48,11 @@
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
-
-static int debug;
#endif /* !__FreeBSD__ */
#include <dahdi/kernel.h>
+
+static int debug;
static int echo_can_create(struct dahdi_chan *chan, struct dahdi_echocanparams *ecp,
struct dahdi_echocanparam *p, struct dahdi_echocan_state **ec);
@@ -147,6 +148,8 @@
dahdi_unregister_echocan_factory(&my_factory);
}
+module_param(debug, int, S_IRUGO | S_IWUSR);
+
#if defined(__FreeBSD__)
static int
echocan_jpah_modevent(module_t mod __unused, int type, void *data __unused)
@@ -167,8 +170,6 @@
MODULE_DEPEND(dahdi_echocan_jpah, dahdi, 1, 1, 1);
#else /* !__FreeBSD__ */
-module_param(debug, int, S_IRUGO | S_IWUSR);
-
MODULE_DESCRIPTION("DAHDI Jason Parker Audio Hoser");
MODULE_AUTHOR("Jason Parker <jparker at digium.com>");
MODULE_LICENSE("GPL v2");
Modified: freebsd/trunk/drivers/dahdi/dahdi_echocan_kb1.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_echocan_kb1.c?view=diff&rev=8346&r1=8345&r2=8346
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_echocan_kb1.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_echocan_kb1.c Thu Mar 18 02:21:05 2010
@@ -42,6 +42,7 @@
#define module_printk(level, fmt, args...) printf(fmt, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printf("%s: " fmt, __FUNCTION__, ## args)
+#define MODULE_PARAM_PREFIX "dahdi.echocan.kb1"
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -53,12 +54,11 @@
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#endif /* !__FreeBSD__ */
+
+#include <dahdi/kernel.h>
static int debug;
-#endif /* !__FreeBSD__ */
-
-#include <dahdi/kernel.h>
-
static int aggressive;
/* Uncomment to provide summary statistics for overall echo can performance every 4000 samples */
@@ -747,6 +747,9 @@
dahdi_unregister_echocan_factory(&my_factory);
}
+module_param(debug, int, S_IRUGO | S_IWUSR);
+module_param(aggressive, int, S_IRUGO | S_IWUSR);
+
#if defined(__FreeBSD__)
static int
echocan_kb1_modevent(module_t mod __unused, int type, void *data __unused)
@@ -767,9 +770,6 @@
MODULE_DEPEND(dahdi_echocan_kb1, dahdi, 1, 1, 1);
#else /* !__FreeBSD__ */
-module_param(debug, int, S_IRUGO | S_IWUSR);
-module_param(aggressive, int, S_IRUGO | S_IWUSR);
-
MODULE_DESCRIPTION("DAHDI 'KB1' Echo Canceler");
MODULE_AUTHOR("Kris Boutilier");
MODULE_LICENSE("GPL v2");
Modified: freebsd/trunk/drivers/dahdi/dahdi_echocan_mg2.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_echocan_mg2.c?view=diff&rev=8346&r1=8345&r2=8346
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_echocan_mg2.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_echocan_mg2.c Thu Mar 18 02:21:05 2010
@@ -42,6 +42,7 @@
#define module_printk(level, fmt, args...) printf(fmt, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printf("%s: " fmt, __FUNCTION__, ## args)
+#define MODULE_PARAM_PREFIX "dahdi.echocan.mg2"
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -53,12 +54,11 @@
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk("%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#endif /* !__FreeBSD__ */
+
+#include <dahdi/kernel.h>
static int debug;
-#endif /* !__FreeBSD__ */
-
-#include <dahdi/kernel.h>
-
static int aggressive;
#define ABS(a) abs(a!=-32768?a:-32767)
@@ -894,6 +894,9 @@
dahdi_unregister_echocan_factory(&my_factory);
}
+module_param(debug, int, S_IRUGO | S_IWUSR);
+module_param(aggressive, int, S_IRUGO | S_IWUSR);
+
#if defined(__FreeBSD__)
static int
echocan_mg2_modevent(module_t mod __unused, int type, void *data __unused)
@@ -914,9 +917,6 @@
MODULE_DEPEND(dahdi_echocan_mg2, dahdi, 1, 1, 1);
#else /* !__FreeBSD__ */
-module_param(debug, int, S_IRUGO | S_IWUSR);
-module_param(aggressive, int, S_IRUGO | S_IWUSR);
-
MODULE_DESCRIPTION("DAHDI 'MG2' Echo Canceler");
MODULE_AUTHOR("Michael Gernoth");
MODULE_LICENSE("GPL v2");
Modified: freebsd/trunk/drivers/dahdi/dahdi_echocan_sec.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_echocan_sec.c?view=diff&rev=8346&r1=8345&r2=8346
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_echocan_sec.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_echocan_sec.c Thu Mar 18 02:21:05 2010
@@ -47,6 +47,7 @@
#define module_printk(level, fmt, args...) printf(fmt, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printf("%s: " fmt, __FUNCTION__, ## args)
+#define MODULE_PARAM_PREFIX "dahdi.echocan.sec"
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -58,11 +59,11 @@
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#endif /* !__FreeBSD__ */
+
+#include <dahdi/kernel.h>
static int debug;
-#endif /* !__FreeBSD__ */
-
-#include <dahdi/kernel.h>
#include "arith.h"
@@ -359,6 +360,8 @@
dahdi_unregister_echocan_factory(&my_factory);
}
+module_param(debug, int, S_IRUGO | S_IWUSR);
+
#if defined(__FreeBSD__)
static int
echocan_sec_modevent(module_t mod __unused, int type, void *data __unused)
@@ -379,8 +382,6 @@
MODULE_DEPEND(dahdi_echocan_sec, dahdi, 1, 1, 1);
#else /* !__FreeBSD__ */
-module_param(debug, int, S_IRUGO | S_IWUSR);
-
MODULE_DESCRIPTION("DAHDI 'SEC' Echo Canceler");
MODULE_AUTHOR("Steve Underwood <steveu at coppice.org>");
MODULE_LICENSE("GPL");
Modified: freebsd/trunk/drivers/dahdi/dahdi_echocan_sec2.c
URL: http://svnview.digium.com/svn/dahdi/freebsd/trunk/drivers/dahdi/dahdi_echocan_sec2.c?view=diff&rev=8346&r1=8345&r2=8346
==============================================================================
--- freebsd/trunk/drivers/dahdi/dahdi_echocan_sec2.c (original)
+++ freebsd/trunk/drivers/dahdi/dahdi_echocan_sec2.c Thu Mar 18 02:21:05 2010
@@ -46,6 +46,7 @@
#define module_printk(level, fmt, args...) printf(fmt, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printf("%s: " fmt, __FUNCTION__, ## args)
+#define MODULE_PARAM_PREFIX "dahdi.echocan.sec2"
#else /* !__FreeBSD__ */
#include <linux/kernel.h>
#include <linux/slab.h>
@@ -57,11 +58,11 @@
#define module_printk(level, fmt, args...) printk(level "%s: " fmt, THIS_MODULE->name, ## args)
#define debug_printk(level, fmt, args...) if (debug >= level) printk(KERN_DEBUG "%s (%s): " fmt, THIS_MODULE->name, __FUNCTION__, ## args)
+#endif /* !__FreeBSD__ */
+
+#include <dahdi/kernel.h>
static int debug;
-#endif /* !__FreeBSD__ */
-
-#include <dahdi/kernel.h>
#include "fir.h"
@@ -354,6 +355,8 @@
dahdi_unregister_echocan_factory(&my_factory);
}
+module_param(debug, int, S_IRUGO | S_IWUSR);
+
#if defined(__FreeBSD__)
static int
echocan_sec2_modevent(module_t mod __unused, int type, void *data __unused)
@@ -374,8 +377,6 @@
MODULE_DEPEND(dahdi_echocan_sec2, dahdi, 1, 1, 1);
#else /* !__FreeBSD__ */
-module_param(debug, int, S_IRUGO | S_IWUSR);
-
MODULE_DESCRIPTION("DAHDI 'SEC2' Echo Canceler");
MODULE_AUTHOR("Steve Underwood <steveu at coppice.org>");
MODULE_LICENSE("GPL");
More information about the svn-commits
mailing list