aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/sbus/char/bpp.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/sbus/char/bpp.c')
-rw-r--r--drivers/sbus/char/bpp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/sbus/char/bpp.c b/drivers/sbus/char/bpp.c
index b87037ec9805..c1c091a00575 100644
--- a/drivers/sbus/char/bpp.c
+++ b/drivers/sbus/char/bpp.c
@@ -19,6 +19,7 @@
19#include <linux/timer.h> 19#include <linux/timer.h>
20#include <linux/ioport.h> 20#include <linux/ioport.h>
21#include <linux/major.h> 21#include <linux/major.h>
22#include <linux/smp_lock.h>
22 23
23#include <asm/uaccess.h> 24#include <asm/uaccess.h>
24#include <asm/io.h> 25#include <asm/io.h>
@@ -429,6 +430,7 @@ static int bpp_open(struct inode *inode, struct file *f)
429 unsigned minor = iminor(inode); 430 unsigned minor = iminor(inode);
430 int ret; 431 int ret;
431 432
433 lock_kernel();
432 spin_lock(&bpp_open_lock); 434 spin_lock(&bpp_open_lock);
433 ret = 0; 435 ret = 0;
434 if (minor >= BPP_NO) { 436 if (minor >= BPP_NO) {
@@ -444,6 +446,7 @@ static int bpp_open(struct inode *inode, struct file *f)
444 } 446 }
445 } 447 }
446 spin_unlock(&bpp_open_lock); 448 spin_unlock(&bpp_open_lock);
449 unlock_kernel();
447 450
448 return ret; 451 return ret;
449} 452}