[svn-commits] sruffell: linux/trunk r9501 - /linux/trunk/drivers/dahdi/wctdm24xxp/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Dec 1 10:59:24 CST 2010


Author: sruffell
Date: Wed Dec  1 10:59:20 2010
New Revision: 9501

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9501
Log:
wctdm24xxp: Replace interruptible_sleep_on() with msleep when delaying.

There were several cases where interruptible_sleep_on() was being used
as a ms timer, since the assumption is that the board will interrupt at
even 1ms intervals.  We can replace these cases with msleep directly to
clarify that we're just waiting.

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

Modified:
    linux/trunk/drivers/dahdi/wctdm24xxp/base.c
    linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c

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=9501&r1=9500&r2=9501
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/base.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/base.c Wed Dec  1 10:59:20 2010
@@ -3979,8 +3979,7 @@
 				wctdm_vpm_out(wc,x,i,0x00);
 		}
 
-		for (i=0;i<30;i++) 
-			interruptible_sleep_on(&wc->regq);
+		msleep(30);
 
 		/* Put in bypass mode */
 		for (i = 0 ; i < MAX_TDM_CHAN ; i++) {
@@ -4215,8 +4214,7 @@
 	spin_unlock_irqrestore(&wc->reglock, flags);
 
 /* Wait just a bit; this makes sure that cmd_dequeue is emitting SPI commands in the appropriate mode(s). */
-	for (x = 0; x < 10; x++)
-		interruptible_sleep_on(&wc->regq);
+	msleep(20);
 
 /* Now that all the cards have been reset, we can stop checking them all if there aren't as many */
 	spin_lock_irqsave(&wc->reglock, flags);
@@ -4271,6 +4269,7 @@
 					 "quad-span module\n", x + 1);
 			} else {
 				if ((wc->desc->ports != 24) && ((x & 0x3) == 1) && !wc->altcs[x]) {
+
 					spin_lock_irqsave(&wc->reglock, flags);
 					wc->altcs[x] = 2;
 
@@ -4282,8 +4281,7 @@
 					wc->modtype[x] = MOD_TYPE_FXSINIT;
 					spin_unlock_irqrestore(&wc->reglock, flags);
 
-					interruptible_sleep_on(&wc->regq);
-					interruptible_sleep_on(&wc->regq);
+					msleep(20);
 
 					spin_lock_irqsave(&wc->reglock, flags);
 					wc->modtype[x] = MOD_TYPE_FXS;

Modified: linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c?view=diff&rev=9501&r1=9500&r2=9501
==============================================================================
--- linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c (original)
+++ linux/trunk/drivers/dahdi/wctdm24xxp/xhfc.c Wed Dec  1 10:59:20 2010
@@ -2627,7 +2627,7 @@
 /* functions called from the wctdm code */
 int wctdm_init_b400m(struct wctdm *wc, int card)
 {
-	int i, ret = 0;
+	int ret = 0;
 	unsigned long flags;
 
 	if (wc->modtype[card & 0xfc] == MOD_TYPE_QRV)
@@ -2641,8 +2641,7 @@
 		wc->modtype[card + 3] = MOD_TYPE_BRI;
 		spin_unlock_irqrestore(&wc->reglock, flags);
 
-		for (i = 0; i < 10; i++)
-			interruptible_sleep_on(&wc->regq);
+		msleep(20);
 
 		if (b400m_probe(wc, card) != 0) {
 			spin_lock_irqsave(&wc->reglock, flags);




More information about the svn-commits mailing list