summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun Ruffell <sruffell@digium.com>2010-08-16 18:43:39 +0000
committerShaun Ruffell <sruffell@digium.com>2010-08-16 18:43:39 +0000
commit8fd93ada52728ce6d237adac71e18162fa657339 (patch)
tree6cfbfe460613a4eef9c251bacd5fddc070827862
parentd0bee2cdc4164114734d9a9ff13be63908181d22 (diff)
dahdi_transcode: No need for ioctl when unlocked_ioctl is available
More work to kill the BKL (Big Kernel Lock) http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10041d2d14688e207d0d829095147aa82c1f211b git-svn-id: http://svn.asterisk.org/svn/dahdi/linux/trunk@9142 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--drivers/dahdi/dahdi_transcode.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/dahdi/dahdi_transcode.c b/drivers/dahdi/dahdi_transcode.c
index 9970440..f5e749b 100644
--- a/drivers/dahdi/dahdi_transcode.c
+++ b/drivers/dahdi/dahdi_transcode.c
@@ -396,10 +396,12 @@ static long dahdi_tc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne
};
}
+#ifndef HAVE_UNLOCKED_IOCTL
static int dahdi_tc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long data)
{
return (int)dahdi_tc_unlocked_ioctl(file, cmd, data);
}
+#endif
static int dahdi_tc_mmap(struct file *file, struct vm_area_struct *vma)
{
@@ -430,14 +432,15 @@ static struct file_operations __dahdi_transcode_fops = {
.owner = THIS_MODULE,
.open = dahdi_tc_open,
.release = dahdi_tc_release,
- .ioctl = dahdi_tc_ioctl,
+#ifdef HAVE_UNLOCKED_IOCTL
+ .unlocked_ioctl = dahdi_tc_unlocked_ioctl,
+#else
+ .ioctl = dahdi_tc_ioctl,
+#endif
.read = dahdi_tc_read,
.write = dahdi_tc_write,
.poll = dahdi_tc_poll,
.mmap = dahdi_tc_mmap,
-#if HAVE_UNLOCKED_IOCTL
- .unlocked_ioctl = dahdi_tc_unlocked_ioctl,
-#endif
};
static struct dahdi_chardev transcode_chardev = {