diff options
author | Brandon Philips <brandon@ifup.org> | 2010-12-17 10:58:22 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-17 15:43:56 -0500 |
commit | 692e42df12e8427219958468301f3d03ca5f0f0d (patch) | |
tree | f2cce5368d3f42bca0a35ce847714ab637384a52 /drivers | |
parent | 587f0d5d6d44e3529028bf197d424f866fb2411d (diff) |
[media] bttv: remove unneeded locking comments
After Mauro's "bttv: Fix locking issues due to BKL removal code" there
are a number of comments that are no longer needed about lock ordering.
Remove them.
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-driver.c | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/drivers/media/video/bt8xx/bttv-driver.c b/drivers/media/video/bt8xx/bttv-driver.c index c14b819d6b78..e071b62f36aa 100644 --- a/drivers/media/video/bt8xx/bttv-driver.c +++ b/drivers/media/video/bt8xx/bttv-driver.c | |||
@@ -2359,13 +2359,6 @@ static int setup_window_lock(struct bttv_fh *fh, struct bttv *btv, | |||
2359 | fh->ov.field = win->field; | 2359 | fh->ov.field = win->field; |
2360 | fh->ov.setup_ok = 1; | 2360 | fh->ov.setup_ok = 1; |
2361 | 2361 | ||
2362 | /* | ||
2363 | * FIXME: btv is protected by btv->lock mutex, while btv->init | ||
2364 | * is protected by fh->cap.vb_lock. This seems to open the | ||
2365 | * possibility for some race situations. Maybe the better would | ||
2366 | * be to unify those locks or to use another way to store the | ||
2367 | * init values that will be consumed by videobuf callbacks | ||
2368 | */ | ||
2369 | btv->init.ov.w.width = win->w.width; | 2362 | btv->init.ov.w.width = win->w.width; |
2370 | btv->init.ov.w.height = win->w.height; | 2363 | btv->init.ov.w.height = win->w.height; |
2371 | btv->init.ov.field = win->field; | 2364 | btv->init.ov.field = win->field; |
@@ -3220,15 +3213,6 @@ static int bttv_open(struct file *file) | |||
3220 | return -ENOMEM; | 3213 | return -ENOMEM; |
3221 | file->private_data = fh; | 3214 | file->private_data = fh; |
3222 | 3215 | ||
3223 | /* | ||
3224 | * btv is protected by btv->lock mutex, while btv->init and other | ||
3225 | * streaming vars are protected by fh->cap.vb_lock. We need to take | ||
3226 | * care of both locks to avoid troubles. However, vb_lock is used also | ||
3227 | * inside videobuf, without calling buf->lock. So, it is a very bad | ||
3228 | * idea to hold both locks at the same time. | ||
3229 | * Let's first copy btv->init at fh, holding cap.vb_lock, and then work | ||
3230 | * with the rest of init, holding btv->lock. | ||
3231 | */ | ||
3232 | *fh = btv->init; | 3216 | *fh = btv->init; |
3233 | 3217 | ||
3234 | fh->type = type; | 3218 | fh->type = type; |
@@ -3303,10 +3287,6 @@ static int bttv_release(struct file *file) | |||
3303 | 3287 | ||
3304 | /* free stuff */ | 3288 | /* free stuff */ |
3305 | 3289 | ||
3306 | /* | ||
3307 | * videobuf uses cap.vb_lock - we should avoid holding btv->lock, | ||
3308 | * otherwise we may have dead lock conditions | ||
3309 | */ | ||
3310 | videobuf_mmap_free(&fh->cap); | 3290 | videobuf_mmap_free(&fh->cap); |
3311 | videobuf_mmap_free(&fh->vbi); | 3291 | videobuf_mmap_free(&fh->vbi); |
3312 | v4l2_prio_close(&btv->prio, fh->prio); | 3292 | v4l2_prio_close(&btv->prio, fh->prio); |