aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2008-07-15 01:44:51 -0400
commit43d2548bb2ef7e6d753f91468a746784041e522d (patch)
tree77d13fcd48fd998393abb825ec36e2b732684a73 /drivers/isdn/hardware
parent585583d95c5660973bc0cf64add517b040acd8a4 (diff)
parent85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff)
Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of: arch/powerpc/Kconfig
Diffstat (limited to 'drivers/isdn/hardware')
-rw-r--r--drivers/isdn/hardware/eicon/divamnt.c16
-rw-r--r--drivers/isdn/hardware/eicon/divasi.c2
-rw-r--r--drivers/isdn/hardware/eicon/divasmain.c2
3 files changed, 15 insertions, 5 deletions
diff --git a/drivers/isdn/hardware/eicon/divamnt.c b/drivers/isdn/hardware/eicon/divamnt.c
index c90928974249..1e85f743214e 100644
--- a/drivers/isdn/hardware/eicon/divamnt.c
+++ b/drivers/isdn/hardware/eicon/divamnt.c
@@ -14,6 +14,7 @@
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/poll.h> 16#include <linux/poll.h>
17#include <linux/smp_lock.h>
17#include <asm/uaccess.h> 18#include <asm/uaccess.h>
18 19
19#include "platform.h" 20#include "platform.h"
@@ -127,14 +128,19 @@ static unsigned int maint_poll(struct file *file, poll_table * wait)
127 128
128static int maint_open(struct inode *ino, struct file *filep) 129static int maint_open(struct inode *ino, struct file *filep)
129{ 130{
131 int ret;
132
133 lock_kernel();
130 /* only one open is allowed, so we test 134 /* only one open is allowed, so we test
131 it atomically */ 135 it atomically */
132 if (test_and_set_bit(0, &opened)) 136 if (test_and_set_bit(0, &opened))
133 return (-EBUSY); 137 ret = -EBUSY;
134 138 else {
135 filep->private_data = NULL; 139 filep->private_data = NULL;
136 140 ret = nonseekable_open(ino, filep);
137 return nonseekable_open(ino, filep); 141 }
142 unlock_kernel();
143 return ret;
138} 144}
139 145
140static int maint_close(struct inode *ino, struct file *filep) 146static int maint_close(struct inode *ino, struct file *filep)
diff --git a/drivers/isdn/hardware/eicon/divasi.c b/drivers/isdn/hardware/eicon/divasi.c
index 78f141e77466..f4969fe0a055 100644
--- a/drivers/isdn/hardware/eicon/divasi.c
+++ b/drivers/isdn/hardware/eicon/divasi.c
@@ -17,6 +17,7 @@
17#include <linux/poll.h> 17#include <linux/poll.h>
18#include <linux/proc_fs.h> 18#include <linux/proc_fs.h>
19#include <linux/skbuff.h> 19#include <linux/skbuff.h>
20#include <linux/smp_lock.h>
20#include <asm/uaccess.h> 21#include <asm/uaccess.h>
21 22
22#include "platform.h" 23#include "platform.h"
@@ -400,6 +401,7 @@ static unsigned int um_idi_poll(struct file *file, poll_table * wait)
400 401
401static int um_idi_open(struct inode *inode, struct file *file) 402static int um_idi_open(struct inode *inode, struct file *file)
402{ 403{
404 cycle_kernel_lock();
403 return (0); 405 return (0);
404} 406}
405 407
diff --git a/drivers/isdn/hardware/eicon/divasmain.c b/drivers/isdn/hardware/eicon/divasmain.c
index 16a874bb1561..fbbcb27fb681 100644
--- a/drivers/isdn/hardware/eicon/divasmain.c
+++ b/drivers/isdn/hardware/eicon/divasmain.c
@@ -21,6 +21,7 @@
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/poll.h> 22#include <linux/poll.h>
23#include <linux/kmod.h> 23#include <linux/kmod.h>
24#include <linux/smp_lock.h>
24 25
25#include "platform.h" 26#include "platform.h"
26#undef ID_MASK 27#undef ID_MASK
@@ -580,6 +581,7 @@ xdi_copy_from_user(void *os_handle, void *dst, const void __user *src, int lengt
580 */ 581 */
581static int divas_open(struct inode *inode, struct file *file) 582static int divas_open(struct inode *inode, struct file *file)
582{ 583{
584 cycle_kernel_lock();
583 return (0); 585 return (0);
584} 586}
585 587