[svn-commits] sruffell: linux/trunk r9412 - /linux/trunk/drivers/dahdi/dahdi-base.c

SVN commits to the Digium repositories svn-commits at lists.digium.com
Fri Sep 24 17:45:02 CDT 2010


Author: sruffell
Date: Fri Sep 24 17:44:59 2010
New Revision: 9412

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9412
Log:
dahdi: Rename 'zaptimer' -> 'dahdi_timer'

DAHDI is not Zaptel anymore.

Signed-off-by: Shaun Ruffell <sruffell at digium.com>
Acked-by: Kinsey Moore <kmoore at digium.com>
Acked-by: Russ Meyerriecks <rmeyerriecks at digium.com>
Acked-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Review: https://reviewboard.asterisk.org/r/940/

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c

Modified: linux/trunk/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/drivers/dahdi/dahdi-base.c?view=diff&rev=9412&r1=9411&r2=9412
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Fri Sep 24 17:44:59 2010
@@ -373,9 +373,9 @@
 	wait_queue_head_t sel;
 };
 
-static LIST_HEAD(zaptimers);
-
-static DEFINE_SPINLOCK(zaptimerlock);
+static LIST_HEAD(dahdi_timers);
+
+static DEFINE_SPINLOCK(dahdi_timer_lock);
 static DEFINE_SPINLOCK(bigzaplock);
 
 struct dahdi_zone {
@@ -2764,9 +2764,9 @@
 	INIT_LIST_HEAD(&t->list);
 	file->private_data = t;
 
-	spin_lock_irqsave(&zaptimerlock, flags);
-	list_add(&t->list, &zaptimers);
-	spin_unlock_irqrestore(&zaptimerlock, flags);
+	spin_lock_irqsave(&dahdi_timer_lock, flags);
+	list_add(&t->list, &dahdi_timers);
+	spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 
 	return 0;
 }
@@ -2779,16 +2779,16 @@
 	if (!(t = file->private_data))
 		return 0;
 
-	spin_lock_irqsave(&zaptimerlock, flags);
-
-	list_for_each_entry_safe(cur, next, &zaptimers, list) {
+	spin_lock_irqsave(&dahdi_timer_lock, flags);
+
+	list_for_each_entry_safe(cur, next, &dahdi_timers, list) {
 		if (t == cur) {
 			list_del(&cur->list);
 			break;
 		}
 	}
 
-	spin_unlock_irqrestore(&zaptimerlock, flags);
+	spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 
 	if (!cur) {
 		module_printk(KERN_NOTICE, "Timer: Not on list??\n");
@@ -3567,39 +3567,39 @@
 		get_user(j, (int __user *)data);
 		if (j < 0)
 			j = 0;
-		spin_lock_irqsave(&zaptimerlock, flags);
+		spin_lock_irqsave(&dahdi_timer_lock, flags);
 		timer->ms = timer->pos = j;
-		spin_unlock_irqrestore(&zaptimerlock, flags);
+		spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 		break;
 	case DAHDI_TIMERACK:
 		get_user(j, (int __user *)data);
-		spin_lock_irqsave(&zaptimerlock, flags);
+		spin_lock_irqsave(&dahdi_timer_lock, flags);
 		if ((j < 1) || (j > timer->tripped))
 			j = timer->tripped;
 		timer->tripped -= j;
-		spin_unlock_irqrestore(&zaptimerlock, flags);
+		spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 		break;
 	case DAHDI_GETEVENT:  /* Get event on queue */
 		j = DAHDI_EVENT_NONE;
-		spin_lock_irqsave(&zaptimerlock, flags);
+		spin_lock_irqsave(&dahdi_timer_lock, flags);
 		  /* set up for no event */
 		if (timer->tripped)
 			j = DAHDI_EVENT_TIMER_EXPIRED;
 		if (timer->ping)
 			j = DAHDI_EVENT_TIMER_PING;
-		spin_unlock_irqrestore(&zaptimerlock, flags);
+		spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 		put_user(j, (int __user *)data);
 		break;
 	case DAHDI_TIMERPING:
-		spin_lock_irqsave(&zaptimerlock, flags);
+		spin_lock_irqsave(&dahdi_timer_lock, flags);
 		timer->ping = 1;
 		wake_up_interruptible(&timer->sel);
-		spin_unlock_irqrestore(&zaptimerlock, flags);
+		spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 		break;
 	case DAHDI_TIMERPONG:
-		spin_lock_irqsave(&zaptimerlock, flags);
+		spin_lock_irqsave(&dahdi_timer_lock, flags);
 		timer->ping = 0;
-		spin_unlock_irqrestore(&zaptimerlock, flags);
+		spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 		break;
 	default:
 		return -ENOTTY;
@@ -8165,9 +8165,9 @@
 	unsigned long flags;
 	struct dahdi_timer *cur;
 
-	spin_lock_irqsave(&zaptimerlock, flags);
-
-	list_for_each_entry(cur, &zaptimers, list) {
+	spin_lock_irqsave(&dahdi_timer_lock, flags);
+
+	list_for_each_entry(cur, &dahdi_timers, list) {
 		if (cur->ms) {
 			cur->pos -= DAHDI_CHUNKSIZE;
 			if (cur->pos <= 0) {
@@ -8178,7 +8178,7 @@
 		}
 	}
 
-	spin_unlock_irqrestore(&zaptimerlock, flags);
+	spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 }
 
 static unsigned int dahdi_timer_poll(struct file *file, struct poll_table_struct *wait_table)
@@ -8188,10 +8188,10 @@
 	int ret = 0;
 	if (timer) {
 		poll_wait(file, &timer->sel, wait_table);
-		spin_lock_irqsave(&zaptimerlock, flags);
+		spin_lock_irqsave(&dahdi_timer_lock, flags);
 		if (timer->tripped || timer->ping)
 			ret |= POLLPRI;
-		spin_unlock_irqrestore(&zaptimerlock, flags);
+		spin_unlock_irqrestore(&dahdi_timer_lock, flags);
 	} else
 		ret = -EINVAL;
 	return ret;




More information about the svn-commits mailing list