diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:03:20 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-06-02 20:03:20 +0000 |
commit | f3d3ddf98ba3020fdfd42a1794fb69bad347b595 (patch) | |
tree | 350670cad86f5d1cf1a41e2d217ba8de3248e107 /drivers/dahdi/voicebus | |
parent | 64ef6f6a66b5c7e788affebe785c7b61dce150f3 (diff) |
wctdm24xxp: Hold the reglock longer in the interrupt handler.
Cuts down on the overhead of constantly saving and restoring the
interrupt registers.
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9962 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi/voicebus')
-rw-r--r-- | drivers/dahdi/voicebus/GpakCust.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/dahdi/voicebus/GpakCust.h b/drivers/dahdi/voicebus/GpakCust.h index 758bc28..3110f42 100644 --- a/drivers/dahdi/voicebus/GpakCust.h +++ b/drivers/dahdi/voicebus/GpakCust.h @@ -152,38 +152,38 @@ void vpmadt032_echocan_free(struct vpmadt032 *vpm, int channo, struct GpakEcanParms; void vpmadt032_get_default_parameters(struct GpakEcanParms *p); -/* If there is a command ready to go to the VPMADT032, return it, otherwise NULL */ +/* If there is a command ready to go to the VPMADT032, return it, otherwise + * NULL. Call with local interrupts disabled. */ static inline struct vpmadt032_cmd *vpmadt032_get_ready_cmd(struct vpmadt032 *vpm) { - unsigned long flags; struct vpmadt032_cmd *cmd; - spin_lock_irqsave(&vpm->list_lock, flags); + spin_lock(&vpm->list_lock); if (list_empty(&vpm->pending_cmds)) { - spin_unlock_irqrestore(&vpm->list_lock, flags); + spin_unlock(&vpm->list_lock); return NULL; } cmd = list_entry(vpm->pending_cmds.next, struct vpmadt032_cmd, node); list_move_tail(&cmd->node, &vpm->active_cmds); - spin_unlock_irqrestore(&vpm->list_lock, flags); + spin_unlock(&vpm->list_lock); return cmd; } +/** + * call with local interrupts disabled. + */ static inline void vpmadt032_resend(struct vpmadt032 *vpm) { - unsigned long flags; struct vpmadt032_cmd *cmd, *temp; - BUG_ON(!vpm); - /* By moving the commands back to the pending list, they will be * transmitted when room is available */ - spin_lock_irqsave(&vpm->list_lock, flags); + spin_lock(&vpm->list_lock); list_for_each_entry_safe(cmd, temp, &vpm->active_cmds, node) { cmd->desc &= ~(__VPM150M_TX); list_move_tail(&cmd->node, &vpm->pending_cmds); } - spin_unlock_irqrestore(&vpm->list_lock, flags); + spin_unlock(&vpm->list_lock); } |