[svn-commits] sruffell: branch linux/sruffell/chan_list_refactoring r9277 - /linux/team/sru...

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


Author: sruffell
Date: Thu Sep  2 12:41:10 2010
New Revision: 9277

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9277
Log:
dahdi: dahdi_specchan_open also does not need the unit parameter.

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

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=9277&r1=9276&r2=9277
==============================================================================
--- 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:41:10 2010
@@ -2805,10 +2805,10 @@
 	return 0;
 }
 
-static int dahdi_specchan_open(struct file *file, int unit)
+static int dahdi_specchan_open(struct file *file)
 {
 	int res = 0;
-	struct dahdi_chan *const chan = chans[unit];
+	struct dahdi_chan *const chan = chan_from_file(file);
 
 	if (chan && chan->sig) {
 		/* Make sure we're not already open, a net device, or a slave device */
@@ -2965,12 +2965,12 @@
 		chan = dahdi_alloc_pseudo();
 		if (chan) {
 			file->private_data = chan;
-			return dahdi_specchan_open(file, chan->channo);
+			return dahdi_specchan_open(file);
 		} else {
 			return -ENXIO;
 		}
 	}
-	return dahdi_specchan_open(file, unit);
+	return dahdi_specchan_open(file);
 }
 
 #if 0
@@ -6036,7 +6036,8 @@
 			return -EINVAL;
 		if (channo > DAHDI_MAX_CHANNELS)
 			return -EINVAL;
-		res = dahdi_specchan_open(file, channo);
+		file->private_data = chans[channo];
+		res = dahdi_specchan_open(file);
 		if (!res) {
 			/* Setup the pointer for future stuff */
 			chan = chans[channo];




More information about the svn-commits mailing list