[svn-commits] sruffell: linux/trunk r9375 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Sep 20 15:34:03 CDT 2010
Author: sruffell
Date: Mon Sep 20 15:33:59 2010
New Revision: 9375
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9375
Log:
dahdi: Remove unit parameter from dahdi_chan_poll.
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=9375&r1=9374&r2=9375
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Sep 20 15:33:59 2010
@@ -8259,10 +8259,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;
@@ -8292,7 +8292,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;
@@ -8304,20 +8303,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 svn-commits
mailing list