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

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


Author: sruffell
Date: Mon Sep 20 15:33:47 2010
New Revision: 9372

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

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

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

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=9372&r1=9371&r2=9372
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Sep 20 15:33:47 2010
@@ -2776,10 +2776,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 */
@@ -2936,12 +2936,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
@@ -6044,7 +6044,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