aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/monreader.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/monreader.c')
-rw-r--r--drivers/s390/char/monreader.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/s390/char/monreader.c b/drivers/s390/char/monreader.c
index 66e21dd23154..60473f86e1f9 100644
--- a/drivers/s390/char/monreader.c
+++ b/drivers/s390/char/monreader.c
@@ -12,7 +12,6 @@
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/moduleparam.h> 13#include <linux/moduleparam.h>
14#include <linux/init.h> 14#include <linux/init.h>
15#include <linux/smp_lock.h>
16#include <linux/errno.h> 15#include <linux/errno.h>
17#include <linux/types.h> 16#include <linux/types.h>
18#include <linux/kernel.h> 17#include <linux/kernel.h>
@@ -283,7 +282,6 @@ static int mon_open(struct inode *inode, struct file *filp)
283 /* 282 /*
284 * only one user allowed 283 * only one user allowed
285 */ 284 */
286 lock_kernel();
287 rc = -EBUSY; 285 rc = -EBUSY;
288 if (test_and_set_bit(MON_IN_USE, &mon_in_use)) 286 if (test_and_set_bit(MON_IN_USE, &mon_in_use))
289 goto out; 287 goto out;
@@ -321,7 +319,6 @@ static int mon_open(struct inode *inode, struct file *filp)
321 } 319 }
322 filp->private_data = monpriv; 320 filp->private_data = monpriv;
323 dev_set_drvdata(monreader_device, monpriv); 321 dev_set_drvdata(monreader_device, monpriv);
324 unlock_kernel();
325 return nonseekable_open(inode, filp); 322 return nonseekable_open(inode, filp);
326 323
327out_path: 324out_path:
@@ -331,7 +328,6 @@ out_priv:
331out_use: 328out_use:
332 clear_bit(MON_IN_USE, &mon_in_use); 329 clear_bit(MON_IN_USE, &mon_in_use);
333out: 330out:
334 unlock_kernel();
335 return rc; 331 return rc;
336} 332}
337 333
@@ -607,6 +603,10 @@ static int __init mon_init(void)
607 } 603 }
608 dcss_mkname(mon_dcss_name, &user_data_connect[8]); 604 dcss_mkname(mon_dcss_name, &user_data_connect[8]);
609 605
606 /*
607 * misc_register() has to be the last action in module_init(), because
608 * file operations will be available right after this.
609 */
610 rc = misc_register(&mon_dev); 610 rc = misc_register(&mon_dev);
611 if (rc < 0 ) 611 if (rc < 0 )
612 goto out; 612 goto out;