[dahdi-commits] sruffell: linux/trunk r5812 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Mon Jan 26 01:26:46 CST 2009
Author: sruffell
Date: Mon Jan 26 01:26:46 2009
New Revision: 5812
URL: http://svn.digium.com/svn-view/dahdi?view=rev&rev=5812
Log:
If an execution context has already disabled interrupts on the local
processor we do not need to disable them again when grabbing another
spin_lock from the same context.
Modified:
linux/trunk/drivers/dahdi/dahdi-base.c
Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svn.digium.com/svn-view/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=5812&r1=5811&r2=5812
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Jan 26 01:26:46 2009
@@ -4323,7 +4323,7 @@
struct dahdi_confinfo conf;
struct dahdi_ring_cadence cad;
} stack;
- unsigned long flags, flagso;
+ unsigned long flags;
int i, j, k, rv;
int ret, c;
@@ -4573,14 +4573,14 @@
/* likewise if 0 mode must have no conf */
if ((!stack.conf.confmode) && stack.conf.confno) return (-EINVAL);
stack.conf.chan = i; /* return with real channel # */
- spin_lock_irqsave(&bigzaplock, flagso);
- spin_lock_irqsave(&chan->lock, flags);
+ spin_lock_irqsave(&bigzaplock, flags);
+ spin_lock(&chan->lock);
if (stack.conf.confno == -1)
stack.conf.confno = dahdi_first_empty_conference();
if ((stack.conf.confno < 1) && (stack.conf.confmode)) {
/* No more empty conferences */
- spin_unlock_irqrestore(&chan->lock, flags);
- spin_unlock_irqrestore(&bigzaplock, flagso);
+ spin_unlock(&chan->lock);
+ spin_unlock_irqrestore(&bigzaplock, flags);
return -EBUSY;
}
/* if changing confs, clear last added info */
@@ -4632,8 +4632,8 @@
}
}
- spin_unlock_irqrestore(&chan->lock, flags);
- spin_unlock_irqrestore(&bigzaplock, flagso);
+ spin_unlock(&chan->lock);
+ spin_unlock_irqrestore(&bigzaplock, flags);
if (copy_to_user((struct dahdi_confinfo *) data,&stack.conf,sizeof(stack.conf)))
return -EFAULT;
break;
@@ -4646,16 +4646,16 @@
if ((stack.conf.confno < 0) || (stack.conf.confno > DAHDI_MAX_CONF)) return(-EINVAL);
/* cant listen to self!! */
if (stack.conf.chan && (stack.conf.chan == stack.conf.confno)) return(-EINVAL);
- spin_lock_irqsave(&bigzaplock, flagso);
- spin_lock_irqsave(&chan->lock, flags);
+ spin_lock_irqsave(&bigzaplock, flags);
+ spin_lock(&chan->lock);
/* if to clear all links */
if ((!stack.conf.chan) && (!stack.conf.confno))
{
/* clear all the links */
memset(conf_links,0,sizeof(conf_links));
recalc_maxlinks();
- spin_unlock_irqrestore(&chan->lock, flags);
- spin_unlock_irqrestore(&bigzaplock, flagso);
+ spin_unlock(&chan->lock);
+ spin_unlock_irqrestore(&bigzaplock, flags);
break;
}
rv = 0; /* clear return value */
@@ -4705,8 +4705,8 @@
}
}
recalc_maxlinks();
- spin_unlock_irqrestore(&chan->lock, flags);
- spin_unlock_irqrestore(&bigzaplock, flagso);
+ spin_unlock(&chan->lock);
+ spin_unlock_irqrestore(&bigzaplock, flags);
return(rv);
case DAHDI_CONFDIAG: /* output diagnostic info to console */
if (!(chan->flags & DAHDI_FLAG_AUDIO)) return (-EINVAL);
More information about the dahdi-commits
mailing list