From 9496527004a8241e779f6b210df6d290a2ed23d3 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Tue, 21 Dec 2010 16:09:27 +0000 Subject: [PATCH] dahdi: Initialize chan->waitq once at registration time. This is instead of initializing the waitq each time the channel is opened or closed. Signed-off-by: Shaun Ruffell Acked-by: Russ Meyerreicks git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9549 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 3f4bcae..f26eab9 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -1288,7 +1288,6 @@ static void close_channel(struct dahdi_chan *chan) chan->pulsecount = 0; chan->pulsetimer = 0; chan->ringdebtimer = 0; - init_waitqueue_head(&chan->waitq); chan->txdialbuf[0] = '\0'; chan->digitmode = DIGIT_MODE_DTMF; chan->dialing = 0; @@ -1564,6 +1563,7 @@ static int dahdi_chan_reg(struct dahdi_chan *chan) might_sleep(); spin_lock_init(&chan->lock); + init_waitqueue_head(&chan->waitq); if (!chan->master) chan->master = chan; if (!chan->readchunk) @@ -2596,8 +2596,6 @@ static int initialize_channel(struct dahdi_chan *chan) chan->itimerset = chan->itimer = chan->otimer = 0; chan->ringdebtimer = 0; - init_waitqueue_head(&chan->waitq); - /* Reset conferences */ reset_conf(chan);