summaryrefslogtreecommitdiff
path: root/drivers/dahdi/wctdm24xxp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dahdi/wctdm24xxp')
-rw-r--r--drivers/dahdi/wctdm24xxp/base.c10
-rw-r--r--drivers/dahdi/wctdm24xxp/xhfc.c5
2 files changed, 6 insertions, 9 deletions
diff --git a/drivers/dahdi/wctdm24xxp/base.c b/drivers/dahdi/wctdm24xxp/base.c
index 59622c8..e6628ae 100644
--- a/drivers/dahdi/wctdm24xxp/base.c
+++ b/drivers/dahdi/wctdm24xxp/base.c
@@ -3979,8 +3979,7 @@ static int wctdm_vpm_init(struct wctdm *wc)
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 @@ static int wctdm_identify_modules(struct wctdm *wc)
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 @@ retry:
"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 @@ retry:
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;
diff --git a/drivers/dahdi/wctdm24xxp/xhfc.c b/drivers/dahdi/wctdm24xxp/xhfc.c
index b65245f..afa4b4d 100644
--- a/drivers/dahdi/wctdm24xxp/xhfc.c
+++ b/drivers/dahdi/wctdm24xxp/xhfc.c
@@ -2627,7 +2627,7 @@ void b400m_post_init(struct b400m *b4)
/* 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 @@ int wctdm_init_b400m(struct wctdm *wc, int card)
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);