diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2008-07-30 07:43:36 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-10-12 07:36:47 -0400 |
commit | d56dc61265d2527a63ab5b0f03199a43cd89ca36 (patch) | |
tree | bea2a5b12fc120ca6e8797b2f16ad9696e0f25dd /drivers/media/video/saa7134/saa7134-empress.c | |
parent | 95f73c5b57990c97047c200b8746ab62a360c5bc (diff) |
V4L/DVB (8613): v4l: move BKL down to the driver level.
The BKL is now moved from the video_open function in v4l2-dev.c to the
various drivers. It seems about a third of the drivers already has a
lock of some sort protecting the open(), another third uses
video_exclusive_open (yuck!) and the last third required adding the
BKL in their open function.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7134/saa7134-empress.c')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-empress.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-empress.c b/drivers/media/video/saa7134/saa7134-empress.c index c0c5d7509c25..6f423d116fb4 100644 --- a/drivers/media/video/saa7134/saa7134-empress.c +++ b/drivers/media/video/saa7134/saa7134-empress.c | |||
@@ -79,9 +79,11 @@ static int ts_open(struct inode *inode, struct file *file) | |||
79 | struct saa7134_dev *dev; | 79 | struct saa7134_dev *dev; |
80 | int err; | 80 | int err; |
81 | 81 | ||
82 | lock_kernel(); | ||
82 | list_for_each_entry(dev, &saa7134_devlist, devlist) | 83 | list_for_each_entry(dev, &saa7134_devlist, devlist) |
83 | if (dev->empress_dev && dev->empress_dev->minor == minor) | 84 | if (dev->empress_dev && dev->empress_dev->minor == minor) |
84 | goto found; | 85 | goto found; |
86 | unlock_kernel(); | ||
85 | return -ENODEV; | 87 | return -ENODEV; |
86 | found: | 88 | found: |
87 | 89 | ||
@@ -103,6 +105,7 @@ static int ts_open(struct inode *inode, struct file *file) | |||
103 | done_up: | 105 | done_up: |
104 | mutex_unlock(&dev->empress_tsq.vb_lock); | 106 | mutex_unlock(&dev->empress_tsq.vb_lock); |
105 | done: | 107 | done: |
108 | unlock_kernel(); | ||
106 | return err; | 109 | return err; |
107 | } | 110 | } |
108 | 111 | ||