[dahdi-commits] sruffell: branch linux/sruffell/chan_list_refactoring r9280 - /linux/team/sru...

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Sep 2 12:41:25 CDT 2010


Author: sruffell
Date: Thu Sep  2 12:41:14 2010
New Revision: 9280

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9280
Log:
dahdi: Remove unit parameter from dahdi_chan_poll.

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=9280&r1=9279&r2=9280
==============================================================================
--- 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:14 2010
@@ -8251,10 +8251,10 @@
 
 /* device poll routine */
 static unsigned int
-dahdi_chan_poll(struct file *file, struct poll_table_struct *wait_table, int unit)
-{
-
-	struct dahdi_chan *chan = chans[unit];
+dahdi_chan_poll(struct file *file, struct poll_table_struct *wait_table)
+{
+
+	struct dahdi_chan *const chan = file->private_data;
 	int	ret;
 	unsigned long flags;
 
@@ -8284,7 +8284,6 @@
 static unsigned int dahdi_poll(struct file *file, struct poll_table_struct *wait_table)
 {
 	int unit = UNIT(file);
-	struct dahdi_chan *chan;
 
 	if (!unit)
 		return -EINVAL;
@@ -8296,20 +8295,18 @@
 		return dahdi_timer_poll(file, wait_table);
 
 	if (unit == 254) {
-		chan = file->private_data;
-		if (!chan)
+		if (!file->private_data)
 			return -EINVAL;
-		return dahdi_chan_poll(file, wait_table,chan->channo);
+		return dahdi_chan_poll(file, wait_table);
 	}
 	if (unit == 255) {
-		chan = file->private_data;
-		if (!chan) {
+		if (!file->private_data) {
 			module_printk(KERN_NOTICE, "No pseudo channel structure to read?\n");
 			return -EINVAL;
 		}
-		return dahdi_chan_poll(file, wait_table, chan->channo);
-	}
-	return dahdi_chan_poll(file, wait_table, unit);
+		return dahdi_chan_poll(file, wait_table);
+	}
+	return dahdi_chan_poll(file, wait_table);
 }
 
 static void __dahdi_transmit_chunk(struct dahdi_chan *chan, unsigned char *buf)




More information about the dahdi-commits mailing list