[svn-commits] sruffell: branch linux/sruffell/chan_list_refactoring r9256 - in /linux/team/...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Thu Sep 2 12:40:58 CDT 2010


Author: sruffell
Date: Thu Sep  2 12:40:46 2010
New Revision: 9256

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

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

Modified:
    linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c
    linux/team/sruffell/chan_list_refactoring/include/dahdi/kernel.h

Modified: linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c?view=diff&rev=9256&r1=9255&r2=9256
==============================================================================
--- linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c (original)
+++ linux/team/sruffell/chan_list_refactoring/drivers/dahdi/dahdi-base.c Thu Sep  2 12:40:46 2010
@@ -152,7 +152,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)
@@ -6048,8 +6048,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
 
@@ -8755,7 +8756,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/team/sruffell/chan_list_refactoring/include/dahdi/kernel.h
URL: http://svnview.digium.com/svn/dahdi/linux/team/sruffell/chan_list_refactoring/include/dahdi/kernel.h?view=diff&rev=9256&r1=9255&r2=9256
==============================================================================
--- linux/team/sruffell/chan_list_refactoring/include/dahdi/kernel.h (original)
+++ linux/team/sruffell/chan_list_refactoring/include/dahdi/kernel.h Thu Sep  2 12:40:46 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