[svn-commits] sruffell: linux/trunk r9377 - /linux/trunk/drivers/dahdi/dahdi-base.c
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Mon Sep 20 15:34:11 CDT 2010
Author: sruffell
Date: Mon Sep 20 15:34:07 2010
New Revision: 9377
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=9377
Log:
dahdi: Remove unit parameter from dahdi_chanandpsuedo_ioctl.
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=9377&r1=9376&r2=9377
==============================================================================
--- linux/trunk/drivers/dahdi/dahdi-base.c (original)
+++ linux/trunk/drivers/dahdi/dahdi-base.c Mon Sep 20 15:34:07 2010
@@ -5145,9 +5145,9 @@
static int
dahdi_chanandpseudo_ioctl(struct file *file, unsigned int cmd,
- unsigned long data, int unit)
-{
- struct dahdi_chan *chan = chans[unit];
+ unsigned long data)
+{
+ struct dahdi_chan *chan = chan_from_file(file);
union {
struct dahdi_bufferinfo bi;
struct dahdi_ring_cadence cad;
@@ -5379,8 +5379,8 @@
return dahdi_ioctl_confdiag(file, data);
case DAHDI_CHANNO: /* get channel number of stream */
- /* return unit/channel number */
- put_user(unit, (int __user *)data);
+ /* return channel number */
+ put_user(chan->channo, (int __user *)data);
break;
case DAHDI_SETLAW:
get_user(j, (int __user *)data);
@@ -5438,7 +5438,7 @@
break;
default:
/* Check for common ioctl's and private ones */
- rv = dahdi_common_ioctl(file, cmd, data, unit);
+ rv = dahdi_common_ioctl(file, cmd, data, chan->channo);
/* if no span, just return with value */
if (!chan->span) return rv;
if ((rv == -ENOTTY) && chan->span->ops->ioctl)
@@ -6033,7 +6033,7 @@
break;
#endif
default:
- return dahdi_chanandpseudo_ioctl(file, cmd, data, chan->channo);
+ return dahdi_chanandpseudo_ioctl(file, cmd, data);
}
return 0;
}
@@ -6072,7 +6072,6 @@
#endif
{
int unit = UNIT(file);
- struct dahdi_chan *chan;
struct dahdi_timer *timer;
int ret;
@@ -6109,13 +6108,12 @@
goto unlock_exit;
}
if (unit == 255) {
- chan = file->private_data;
- if (!chan) {
+ if (!file->private_data) {
module_printk(KERN_NOTICE, "No pseudo channel structure to read?\n");
ret = -EINVAL;
goto unlock_exit;
}
- ret = dahdi_chanandpseudo_ioctl(file, cmd, data, chan->channo);
+ ret = dahdi_chanandpseudo_ioctl(file, cmd, data);
goto unlock_exit;
}
More information about the svn-commits
mailing list