Skip to content

Commit

Permalink
dvb: cdev lock_kernel() pushdown
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
  • Loading branch information
Jonathan Corbet committed Jun 20, 2008
1 parent 20613f2 commit 5794e1b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/dvb/dvb-core/dvbdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 5794e1b

Please sign in to comment.