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 /drivers/media/dvb/dvb-core/dvbdev.c | |
parent | 20613f24bcd1cbfb08e64f0bb00c44481313b448 (diff) | |
download | lwn-5794e1b14bcd9817c5fa27d3254996f0d9551296.tar.gz lwn-5794e1b14bcd9817c5fa27d3254996f0d9551296.zip |
dvb: cdev lock_kernel() pushdown
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Diffstat (limited to 'drivers/media/dvb/dvb-core/dvbdev.c')
-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 8b56d929f7fd..e208a60c048a 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; } |