dect
/
linux-2.6
Archived
13
0
Fork 0

apm-emulation: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann 2008-05-20 19:15:33 +02:00 committed by Jonathan Corbet
parent b82829943c
commit 2861ead38b
1 changed files with 3 additions and 0 deletions

View File

@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/poll.h>
#include <linux/slab.h>
#include <linux/smp_lock.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
#include <linux/miscdevice.h>
@ -416,6 +417,7 @@ static int apm_open(struct inode * inode, struct file * filp)
{
struct apm_user *as;
lock_kernel();
as = kzalloc(sizeof(*as), GFP_KERNEL);
if (as) {
/*
@ -435,6 +437,7 @@ static int apm_open(struct inode * inode, struct file * filp)
filp->private_data = as;
}
unlock_kernel();
return as ? 0 : -ENOMEM;
}