diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-15 16:26:57 -0600 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 14:05:50 -0600 |
commit | 5794e1b14bcd9817c5fa27d3254996f0d9551296 (patch) | |
tree | 280cbefa6733b7d768d2249c358c278e824c891d | |
parent | 20613f24bcd1cbfb08e64f0bb00c44481313b448 (diff) |
dvb: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
-rw-r--r-- | drivers/media/dvb/dvb-core/dvbdev.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c index 8b56d929f7f..e208a60c048 100644 --- a/drivers/media/dvb/dvb-core/dvbdev.c +++ b/drivers/media/dvb/dvb-core/dvbdev.c @@ -32,6 +32,7 @@ #include <linux/fs.h> #include <linux/cdev.h> #include <linux/mutex.h> +#include <linux/smp_lock.h> #include "dvbdev.h" static int dvbdev_debug; @@ -74,6 +75,7 @@ static int dvb_device_open(struct inode *inode, struct file *file) { struct dvb_device *dvbdev; + lock_kernel(); dvbdev = dvbdev_find_device (iminor(inode)); if (dvbdev && dvbdev->fops) { @@ -90,8 +92,10 @@ static int dvb_device_open(struct inode *inode, struct file *file) file->f_op = fops_get(old_fops); } fops_put(old_fops); + unlock_kernel(); return err; } + unlock_kernel(); return -ENODEV; } |