summaryrefslogtreecommitdiff
path: root/drivers/dahdi
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-09-20 20:33:59 +0000
committerShaun Ruffell <sruffell@digium.com>2010-09-20 20:33:59 +0000
commit8b19e76e2d2c4bfbc46b0de6d58ebd9a3272212e (patch)
treee621582c322fff739288dd427b5dcb90b59d2751 /drivers/dahdi
parentdff1c01fab7cab2d6aa458b60b30ab0abb7c7c28 (diff)
dahdi: Remove unit parameter from dahdi_chan_poll.
Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell <sruffell@digium.com> git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9375 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'drivers/dahdi')
-rw-r--r--drivers/dahdi/dahdi-base.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c
index 7d56287..728a480 100644
--- a/drivers/dahdi/dahdi-base.c
+++ b/drivers/dahdi/dahdi-base.c
@@ -8259,10 +8259,10 @@ static unsigned int dahdi_timer_poll(struct file *file, struct poll_table_struct
/* device poll routine */
static unsigned int
-dahdi_chan_poll(struct file *file, struct poll_table_struct *wait_table, int unit)
+dahdi_chan_poll(struct file *file, struct poll_table_struct *wait_table)
{
- struct dahdi_chan *chan = chans[unit];
+ struct dahdi_chan *const chan = file->private_data;
int ret;
unsigned long flags;
@@ -8292,7 +8292,6 @@ dahdi_chan_poll(struct file *file, struct poll_table_struct *wait_table, int uni
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 @@ static unsigned int dahdi_poll(struct file *file, struct poll_table_struct *wait
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);
}
- return dahdi_chan_poll(file, wait_table, unit);
+ return dahdi_chan_poll(file, wait_table);
}
static void __dahdi_transmit_chunk(struct dahdi_chan *chan, unsigned char *buf)