aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/telephony/phonedev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/telephony/phonedev.c')
-rw-r--r--drivers/telephony/phonedev.c3
1 files changed, 3 insertions, 0 deletions
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