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

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


Author: sruffell
Date: Thu Sep  2 12:41:15 2010
New Revision: 9281

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9281
Log:
dahdi: Remove unit parameter to dahdi_prechan_ioctl

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=9281&r1=9280&r2=9281
==============================================================================
--- 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:15 2010
@@ -6030,13 +6030,12 @@
 	return 0;
 }
 
-static int dahdi_prechan_ioctl(struct file *file, unsigned int cmd, unsigned long data, int unit)
-{
-	struct dahdi_chan *chan = file->private_data;
+static int dahdi_prechan_ioctl(struct file *file, unsigned int cmd, unsigned long data)
+{
 	int channo;
 	int res;
 
-	if (chan) {
+	if (file->private_data) {
 		module_printk(KERN_NOTICE, "Huh?  Prechan already has private data??\n");
 	}
 	switch(cmd) {
@@ -6048,13 +6047,8 @@
 			return -EINVAL;
 		file->private_data = chans[channo];
 		res = dahdi_specchan_open(file);
-		if (!res) {
-			/* Setup the pointer for future stuff */
-			chan = chans[channo];
-			file->private_data = chan;
-			/* Return success */
-			return 0;
-		}
+		if (res)
+			file->private_data = NULL;
 		return res;
 	default:
 		return -ENOSYS;
@@ -6100,11 +6094,10 @@
 		goto unlock_exit;
 	}
 	if (unit == 254) {
-		chan = file->private_data;
-		if (chan)
+		if (file->private_data)
 			ret = dahdi_chan_ioctl(file, cmd, data);
 		else
-			ret = dahdi_prechan_ioctl(file, cmd, data, unit);
+			ret = dahdi_prechan_ioctl(file, cmd, data);
 		goto unlock_exit;
 	}
 	if (unit == 255) {




More information about the svn-commits mailing list