From 44ee940137d2bb6e3615dd6b95f8411cfe6d57d8 Mon Sep 17 00:00:00 2001 From: Shaun Ruffell Date: Mon, 20 Sep 2010 20:33:59 +0000 Subject: [PATCH] dahdi: Remove unit parameter from dahdi_chan_poll. Review: https://reviewboard.asterisk.org/r/905/ Signed-off-by: Shaun Ruffell git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9375 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- drivers/dahdi/dahdi-base.c | 17 +++++++---------- 1 file 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)