summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2008-05-20 19:16:12 +0200
committerJonathan Corbet <corbet@lwn.net>2008-06-20 22:05:58 +0200
commitcad84238056babf4e4e6b0de183238224aab8177 (patch)
tree19b932998799cbdb4f00aa6cf744ae77f4c11e0a /drivers/media/radio
parentmacintosh-smu: BKL pushdown (diff)
downloadlinux-cad84238056babf4e4e6b0de183238224aab8177.tar.xz
linux-cad84238056babf4e4e6b0de183238224aab8177.zip
media-radio-miropcm20-rds: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r--drivers/media/radio/miropcm20-rds.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/radio/miropcm20-rds.c b/drivers/media/radio/miropcm20-rds.c
index 06dfed9ef4c7..3e840f74d45c 100644
--- a/drivers/media/radio/miropcm20-rds.c
+++ b/drivers/media/radio/miropcm20-rds.c
@@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/slab.h>
+#include <linux/smp_lock.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
#include <linux/delay.h>
@@ -27,13 +28,16 @@ static int rds_f_open(struct inode *in, struct file *fi)
if (rds_users)
return -EBUSY;
+ lock_kernel();
rds_users++;
if ((text_buffer=kmalloc(66, GFP_KERNEL)) == 0) {
rds_users--;
printk(KERN_NOTICE "aci-rds: Out of memory by open()...\n");
+ unlock_kernel();
return -ENOMEM;
}
+ unlock_kernel();
return 0;
}