diff options
author | Shaun Ruffell <sruffell@digium.com> | 2010-09-20 20:34:03 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2010-09-20 20:34:03 +0000 |
commit | d7191c24cbeb463501aa6d334ab5f3cb9d275a90 (patch) | |
tree | 8ee2ff0fc0530cbe320472eed6a5ad9de5e1cb3b | |
parent | f9d537562aec11ff46debd2a2f15d264c6b71b68 (diff) |
dahdi: Remove unit parameter to dahdi_prechan_ioctl
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@9376 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | drivers/dahdi/dahdi-base.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/dahdi/dahdi-base.c b/drivers/dahdi/dahdi-base.c index 728a480..b5538e8 100644 --- a/drivers/dahdi/dahdi-base.c +++ b/drivers/dahdi/dahdi-base.c @@ -6038,13 +6038,12 @@ static int dahdi_chan_ioctl(struct file *file, unsigned int cmd, unsigned long d return 0; } -static int dahdi_prechan_ioctl(struct file *file, unsigned int cmd, unsigned long data, int unit) +static int dahdi_prechan_ioctl(struct file *file, unsigned int cmd, unsigned long data) { - struct dahdi_chan *chan = file->private_data; int channo; int res; - if (chan) { + if (file->private_data) { module_printk(KERN_NOTICE, "Huh? Prechan already has private data??\n"); } switch(cmd) { @@ -6056,13 +6055,8 @@ static int dahdi_prechan_ioctl(struct file *file, unsigned int cmd, unsigned lon 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; @@ -6108,11 +6102,10 @@ static int dahdi_ioctl(struct inode *inode, struct file *file, 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) { |