[svn-commits] sruffell: linux/trunk r9950 - in /linux/trunk/drivers/dahdi: voicebus/ wctdm2...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Jun 2 15:02:27 CDT 2011


Author: sruffell
Date: Thu Jun  2 15:02:23 2011
New Revision: 9950

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9950
Log:
wcte12xp, wctdm24xxp: Use a constant string for the VPM workqueue name.

In my opinion naming the VPM workqueues for each board is not worth the
extra complexity.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/voicebus/GpakCust.c
    linux/trunk/drivers/dahdi/voicebus/GpakCust.h
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wcte12xp/base.c

Modified: linux/trunk/drivers/dahdi/voicebus/GpakCust.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/GpakCust.c?view=diff&rev=9950&r1=9949&r2=9950
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/GpakCust.c (original)
+++ linux/trunk/drivers/dahdi/voicebus/GpakCust.c Thu Jun  2 15:02:23 2011
@@ -492,29 +492,16 @@
 EXPORT_SYMBOL(vpmadt032_echocan_free);
 
 struct vpmadt032 *
-vpmadt032_alloc(struct vpmadt032_options *options, const char *board_name)
+vpmadt032_alloc(struct vpmadt032_options *options)
 {
 	struct vpmadt032 *vpm;
 	int i;
-	const char *suffix = "-vpm";
-	size_t length;
 
 	might_sleep();
 
-	length = strlen(board_name) + strlen(suffix) + 1;
-
-	/* Add a little extra to store the wq_name. */
-	vpm = kzalloc(sizeof(*vpm) + length, GFP_KERNEL);
+	vpm = kzalloc(sizeof(*vpm), GFP_KERNEL);
 	if (!vpm)
 		return NULL;
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 18)
-	/* There is a limit on the length of the name of the workqueue. */
-	strcpy(vpm->wq_name, "vpmadt032");
-#else
-	strcpy(vpm->wq_name, board_name);
-	strcat(vpm->wq_name, suffix);
-#endif
 
 	/* Init our vpmadt032 struct */
 	memcpy(&vpm->options, options, sizeof(*options));
@@ -531,7 +518,7 @@
 	 * the operations can take 100s of ms, most of that time spent sleeping.
 	 * On single CPU systems, this unduly serializes operations accross
 	 * multiple vpmadt032 instances. */
-	vpm->wq = create_singlethread_workqueue(vpm->wq_name);
+	vpm->wq = create_singlethread_workqueue("vpmadt032");
 	if (!vpm->wq) {
 		kfree(vpm);
 		return NULL;

Modified: linux/trunk/drivers/dahdi/voicebus/GpakCust.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/voicebus/GpakCust.h?view=diff&rev=9950&r1=9949&r2=9950
==============================================================================
--- linux/trunk/drivers/dahdi/voicebus/GpakCust.h (original)
+++ linux/trunk/drivers/dahdi/voicebus/GpakCust.h Thu Jun  2 15:02:23 2011
@@ -128,8 +128,6 @@
 	struct list_head active_cmds;
 	struct vpmadt032_options options;
 	void (*setchanconfig_from_state)(struct vpmadt032 *vpm, int channel, struct GpakChannelConfig *chanconfig);
-	/* This must be last */
-	char wq_name[0];
 };
 
 struct voicebus;
@@ -141,8 +139,7 @@
 char vpmadt032tone_to_zaptone(GpakToneCodes_t tone);
 int vpmadt032_init(struct vpmadt032 *vpm, struct voicebus *vb);
 int vpmadt032_reset(struct vpmadt032 *vpm);
-struct vpmadt032 *vpmadt032_alloc(struct vpmadt032_options *options,
-					const char *board_name);
+struct vpmadt032 *vpmadt032_alloc(struct vpmadt032_options *options);
 void vpmadt032_free(struct vpmadt032 *vpm);
 int vpmadt032_echocan_create(struct vpmadt032 *vpm, int channo,
 			     enum adt_companding companding,

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/base.c?view=diff&rev=9950&r1=9949&r2=9950
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Thu Jun  2 15:02:23 2011
@@ -3833,7 +3833,7 @@
 	options.vpmnlpmaxsupp = vpmnlpmaxsupp;
 	options.channels = wc->avchannels;
 
-	wc->vpmadt032 = vpmadt032_alloc(&options, wc->board_name);
+	wc->vpmadt032 = vpmadt032_alloc(&options);
 	if (!wc->vpmadt032)
 		return -ENOMEM;
 

Modified: linux/trunk/drivers/dahdi/wcte12xp/base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wcte12xp/base.c?view=diff&rev=9950&r1=9949&r2=9950
==============================================================================
--- linux/trunk/drivers/dahdi/wcte12xp/base.c (original)
+++ linux/trunk/drivers/dahdi/wcte12xp/base.c Thu Jun  2 15:02:23 2011
@@ -1418,7 +1418,7 @@
 	 * done setting it up here, an hour should cover it... */
 	wc->vpm_check = jiffies + HZ*3600;
 
-	vpm = vpmadt032_alloc(&options, wc->name);
+	vpm = vpmadt032_alloc(&options);
 	if (!vpm)
 		return -ENOMEM;
 




More information about the svn-commits mailing list