diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/isdn/i4l/isdn_net.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/isdn/i4l/isdn_net.h b/drivers/isdn/i4l/isdn_net.h index 74032d0881ef..7511f08effa5 100644 --- a/drivers/isdn/i4l/isdn_net.h +++ b/drivers/isdn/i4l/isdn_net.h | |||
@@ -83,19 +83,19 @@ static __inline__ isdn_net_local * isdn_net_get_locked_lp(isdn_net_dev *nd) | |||
83 | 83 | ||
84 | spin_lock_irqsave(&nd->queue_lock, flags); | 84 | spin_lock_irqsave(&nd->queue_lock, flags); |
85 | lp = nd->queue; /* get lp on top of queue */ | 85 | lp = nd->queue; /* get lp on top of queue */ |
86 | spin_lock(&nd->queue->xmit_lock); | ||
87 | while (isdn_net_lp_busy(nd->queue)) { | 86 | while (isdn_net_lp_busy(nd->queue)) { |
88 | spin_unlock(&nd->queue->xmit_lock); | ||
89 | nd->queue = nd->queue->next; | 87 | nd->queue = nd->queue->next; |
90 | if (nd->queue == lp) { /* not found -- should never happen */ | 88 | if (nd->queue == lp) { /* not found -- should never happen */ |
91 | lp = NULL; | 89 | lp = NULL; |
92 | goto errout; | 90 | goto errout; |
93 | } | 91 | } |
94 | spin_lock(&nd->queue->xmit_lock); | ||
95 | } | 92 | } |
96 | lp = nd->queue; | 93 | lp = nd->queue; |
97 | nd->queue = nd->queue->next; | 94 | nd->queue = nd->queue->next; |
95 | spin_unlock_irqrestore(&nd->queue_lock, flags); | ||
96 | spin_lock(&lp->xmit_lock); | ||
98 | local_bh_disable(); | 97 | local_bh_disable(); |
98 | return lp; | ||
99 | errout: | 99 | errout: |
100 | spin_unlock_irqrestore(&nd->queue_lock, flags); | 100 | spin_unlock_irqrestore(&nd->queue_lock, flags); |
101 | return lp; | 101 | return lp; |