diff options
author | Jonathan Corbet <corbet@lwn.net> | 2008-05-15 22:26:57 (GMT) |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2008-06-20 20:05:50 (GMT) |
commit | 5794e1b14bcd9817c5fa27d3254996f0d9551296 (patch) | |
tree | 280cbefa6733b7d768d2249c358c278e824c891d /drivers/media/dvb | |
parent | 20613f24bcd1cbfb08e64f0bb00c44481313b448 (diff) | |
download | linux-5794e1b14bcd9817c5fa27d3254996f0d9551296.tar.xz |
dvb: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/media/dvb')
-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 8b56d92..e208a60 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; } |