aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/telephony
diff options
context:
space:
mode:
authorAnton Vorontsov <cbouatmailru@gmail.com>2008-07-29 18:05:23 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2008-07-29 18:05:23 -0400
commit9fec6060d9e48ed7db0dac0e16d0f0f0e615b7f6 (patch)
tree74b41f31a08f6500ff3dfcf64ba21e2d9a8e87e5 /drivers/telephony
parentfece418418f51e92dd7e67e17c5e3fe5a28d3279 (diff)
parent6e86841d05f371b5b9b86ce76c02aaee83352298 (diff)
Merge branch 'master' of /home/cbou/linux-2.6
Conflicts: drivers/power/Kconfig drivers/power/Makefile
Diffstat (limited to 'drivers/telephony')
-rw-r--r--drivers/telephony/ixj.c17
-rw-r--r--drivers/telephony/phonedev.c3
2 files changed, 16 insertions, 4 deletions
diff --git a/drivers/telephony/ixj.c b/drivers/telephony/ixj.c
index 49cd9793404f..ec7aeb502d15 100644
--- a/drivers/telephony/ixj.c
+++ b/drivers/telephony/ixj.c
@@ -6095,15 +6095,15 @@ static int capabilities_check(IXJ *j, struct phone_capability *pcreq)
6095 return retval; 6095 return retval;
6096} 6096}
6097 6097
6098static int ixj_ioctl(struct inode *inode, struct file *file_p, unsigned int cmd, unsigned long arg) 6098static long do_ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long arg)
6099{ 6099{
6100 IXJ_TONE ti; 6100 IXJ_TONE ti;
6101 IXJ_FILTER jf; 6101 IXJ_FILTER jf;
6102 IXJ_FILTER_RAW jfr; 6102 IXJ_FILTER_RAW jfr;
6103 void __user *argp = (void __user *)arg; 6103 void __user *argp = (void __user *)arg;
6104 6104 struct inode *inode = file_p->f_path.dentry->d_inode;
6105 unsigned int raise, mant;
6106 unsigned int minor = iminor(inode); 6105 unsigned int minor = iminor(inode);
6106 unsigned int raise, mant;
6107 int board = NUM(inode); 6107 int board = NUM(inode);
6108 6108
6109 IXJ *j = get_ixj(NUM(inode)); 6109 IXJ *j = get_ixj(NUM(inode));
@@ -6661,6 +6661,15 @@ static int ixj_ioctl(struct inode *inode, struct file *file_p, unsigned int cmd,
6661 return retval; 6661 return retval;
6662} 6662}
6663 6663
6664static long ixj_ioctl(struct file *file_p, unsigned int cmd, unsigned long arg)
6665{
6666 long ret;
6667 lock_kernel();
6668 ret = do_ixj_ioctl(file_p, cmd, arg);
6669 unlock_kernel();
6670 return ret;
6671}
6672
6664static int ixj_fasync(int fd, struct file *file_p, int mode) 6673static int ixj_fasync(int fd, struct file *file_p, int mode)
6665{ 6674{
6666 IXJ *j = get_ixj(NUM(file_p->f_path.dentry->d_inode)); 6675 IXJ *j = get_ixj(NUM(file_p->f_path.dentry->d_inode));
@@ -6674,7 +6683,7 @@ static const struct file_operations ixj_fops =
6674 .read = ixj_enhanced_read, 6683 .read = ixj_enhanced_read,
6675 .write = ixj_enhanced_write, 6684 .write = ixj_enhanced_write,
6676 .poll = ixj_poll, 6685 .poll = ixj_poll,
6677 .ioctl = ixj_ioctl, 6686 .unlocked_ioctl = ixj_ioctl,
6678 .release = ixj_release, 6687 .release = ixj_release,
6679 .fasync = ixj_fasync 6688 .fasync = ixj_fasync
6680}; 6689};
diff --git a/drivers/telephony/phonedev.c b/drivers/telephony/phonedev.c
index bcea8d9b718c..4d74ba36c3a1 100644
--- a/drivers/telephony/phonedev.c
+++ b/drivers/telephony/phonedev.c
@@ -23,6 +23,7 @@
23#include <linux/errno.h> 23#include <linux/errno.h>
24#include <linux/phonedev.h> 24#include <linux/phonedev.h>
25#include <linux/init.h> 25#include <linux/init.h>
26#include <linux/smp_lock.h>
26#include <asm/uaccess.h> 27#include <asm/uaccess.h>
27#include <asm/system.h> 28#include <asm/system.h>
28 29
@@ -53,6 +54,7 @@ static int phone_open(struct inode *inode, struct file *file)
53 if (minor >= PHONE_NUM_DEVICES) 54 if (minor >= PHONE_NUM_DEVICES)
54 return -ENODEV; 55 return -ENODEV;
55 56
57 lock_kernel();
56 mutex_lock(&phone_lock); 58 mutex_lock(&phone_lock);
57 p = phone_device[minor]; 59 p = phone_device[minor];
58 if (p) 60 if (p)
@@ -79,6 +81,7 @@ static int phone_open(struct inode *inode, struct file *file)
79 fops_put(old_fops); 81 fops_put(old_fops);
80end: 82end:
81 mutex_unlock(&phone_lock); 83 mutex_unlock(&phone_lock);
84 unlock_kernel();
82 return err; 85 return err;
83} 86}
84 87