From 5e35b75cd1ae6914939ee518bf896165cde004f7 Mon Sep 17 00:00:00 2001 From: Brandon Philips Date: Fri, 17 Dec 2010 12:58:22 -0300 Subject: [PATCH] --- yaml --- r: 223476 b: refs/heads/master c: 692e42df12e8427219958468301f3d03ca5f0f0d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/media/video/bt8xx/bttv-driver.c | 20 ------------------- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/[refs] b/[refs] index 0b9a047b25e1..f6325a41b1ad 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 587f0d5d6d44e3529028bf197d424f866fb2411d +refs/heads/master: 692e42df12e8427219958468301f3d03ca5f0f0d diff --git a/trunk/drivers/media/video/bt8xx/bttv-driver.c b/trunk/drivers/media/video/bt8xx/bttv-driver.c index c14b819d6b78..e071b62f36aa 100644 --- a/trunk/drivers/media/video/bt8xx/bttv-driver.c +++ b/trunk/drivers/media/video/bt8xx/bttv-driver.c @@ -2359,13 +2359,6 @@ static int setup_window_lock(struct bttv_fh *fh, struct bttv *btv, fh->ov.field = win->field; fh->ov.setup_ok = 1; - /* - * FIXME: btv is protected by btv->lock mutex, while btv->init - * is protected by fh->cap.vb_lock. This seems to open the - * possibility for some race situations. Maybe the better would - * be to unify those locks or to use another way to store the - * init values that will be consumed by videobuf callbacks - */ btv->init.ov.w.width = win->w.width; btv->init.ov.w.height = win->w.height; btv->init.ov.field = win->field; @@ -3220,15 +3213,6 @@ static int bttv_open(struct file *file) return -ENOMEM; file->private_data = fh; - /* - * btv is protected by btv->lock mutex, while btv->init and other - * streaming vars are protected by fh->cap.vb_lock. We need to take - * care of both locks to avoid troubles. However, vb_lock is used also - * inside videobuf, without calling buf->lock. So, it is a very bad - * idea to hold both locks at the same time. - * Let's first copy btv->init at fh, holding cap.vb_lock, and then work - * with the rest of init, holding btv->lock. - */ *fh = btv->init; fh->type = type; @@ -3303,10 +3287,6 @@ static int bttv_release(struct file *file) /* free stuff */ - /* - * videobuf uses cap.vb_lock - we should avoid holding btv->lock, - * otherwise we may have dead lock conditions - */ videobuf_mmap_free(&fh->cap); videobuf_mmap_free(&fh->vbi); v4l2_prio_close(&btv->prio, fh->prio);