diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:02:23 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:02:23 +0000 |
commit | 87c911c8248a41c5e57bd7c19dad106a1b30d531 (patch) | |
tree | c2a886f420e8c5fe6a2e9d48475087a485d7cb8c /drivers/dahdi/voicebus | |
parent | d3cb93127b5a6241fe9004f3ae609bdb4164f78b (diff) |
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@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9950 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/voicebus')
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.c | 19 | ||||
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.h | 5 |
2 files changed, 4 insertions, 20 deletions
diff --git a/drivers/dahdi/voicebus/GpakCust.c b/drivers/dahdi/voicebus/GpakCust.c index 1d3d26e..9a36a2f 100644 --- a/drivers/dahdi/voicebus/GpakCust.c +++ b/drivers/dahdi/voicebus/GpakCust.c @@ -492,30 +492,17 @@ void vpmadt032_echocan_free(struct vpmadt032 *vpm, int channo, 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)); spin_lock_init(&vpm->list_lock); @@ -531,7 +518,7 @@ vpmadt032_alloc(struct vpmadt032_options *options, const char *board_name) * 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; diff --git a/drivers/dahdi/voicebus/GpakCust.h b/drivers/dahdi/voicebus/GpakCust.h index 83968e5..bd3308e 100644 --- a/drivers/dahdi/voicebus/GpakCust.h +++ b/drivers/dahdi/voicebus/GpakCust.h @@ -128,8 +128,6 @@ struct vpmadt032 { 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 @@ struct dahdi_echocan_state; 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, |