[svn-commits] sruffell: linux/trunk r9354 - in /linux/trunk: drivers/dahdi/ include/dahdi/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Mon Sep 20 15:32:39 CDT 2010


Author: sruffell
Date: Mon Sep 20 15:32:35 2010
New Revision: 9354

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9354
Log:
dahdi: Embed the proc entries in struct dahdi_span.

Part of preparations for replacing the array of spans with a list of
spans.

Review: https://reviewboard.asterisk.org/r/905/

Signed-off-by: Shaun Ruffell <sruffell at digium.com>

Modified:
    linux/trunk/drivers/dahdi/dahdi-base.c
    linux/trunk/include/dahdi/kernel.h

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=9354&r1=9353&r2=9354
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Sep 20 15:32:35 2010
@@ -151,7 +151,7 @@
 EXPORT_SYMBOL(dahdi_set_hpec_ioctl);
 
 #ifdef CONFIG_PROC_FS
-static struct proc_dir_entry *proc_entries[DAHDI_MAX_SPANS];
+static struct proc_dir_entry *root_proc_entry;
 #endif
 
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,27)
@@ -6026,8 +6026,9 @@
 	{
 		char tempfile[17];
 		snprintf(tempfile, sizeof(tempfile), "dahdi/%d", span->spanno);
-		proc_entries[span->spanno] = create_proc_read_entry(tempfile, 0444,
-				NULL, dahdi_proc_read, (int *) (long) span->spanno);
+		span->proc_entry = create_proc_read_entry(tempfile, 0444,
+					NULL, dahdi_proc_read,
+					(int *) (long) span->spanno);
 	}
 #endif
 
@@ -8729,7 +8730,7 @@
 	int res = 0;
 
 #ifdef CONFIG_PROC_FS
-	proc_entries[0] = proc_mkdir("dahdi", NULL);
+	root_proc_entry = proc_mkdir("dahdi", NULL);
 #endif
 
 	if ((res = register_chrdev(DAHDI_MAJOR, "dahdi", &dahdi_fops))) {

Modified: linux/trunk/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/trunk/include/dahdi/kernel.h?view=diff&rev=9354&r1=9353&r2=9354
==============================================================================
--- linux/trunk/include/dahdi/kernel.h (original)
+++ linux/trunk/include/dahdi/kernel.h Mon Sep 20 15:32:35 2010
@@ -871,6 +871,10 @@
 	int watchcounter;
 	int watchstate;
 #endif	
+
+#ifdef CONFIG_PROC_FS
+	struct proc_dir_entry *proc_entry;
+#endif
 };
 
 struct dahdi_transcoder_channel {




More information about the svn-commits mailing list