diff options
author | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-15 15:44:51 +1000 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2008-07-15 15:44:51 +1000 |
commit | 43d2548bb2ef7e6d753f91468a746784041e522d (patch) | |
tree | 77d13fcd48fd998393abb825ec36e2b732684a73 /drivers/media/radio | |
parent | 585583d95c5660973bc0cf64add517b040acd8a4 (diff) | |
parent | 85082fd7cbe3173198aac0eb5e85ab1edcc6352c (diff) |
Merge commit '85082fd7cbe3173198aac0eb5e85ab1edcc6352c' into test-build
Manual fixup of:
arch/powerpc/Kconfig
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/miropcm20-rds.c | 4 |
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; } |