aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/cx88/cx88-mpeg.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/media/video/cx88/cx88-mpeg.c b/drivers/media/video/cx88/cx88-mpeg.c
index f12733d6bf72..e357f415db06 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -615,8 +615,8 @@ static int cx8802_request_acquire(struct cx8802_driver *drv)
615 615
616 if (drv->advise_acquire) 616 if (drv->advise_acquire)
617 { 617 {
618 core->active_ref++;
619 mutex_lock(&drv->core->lock); 618 mutex_lock(&drv->core->lock);
619 core->active_ref++;
620 if (core->active_type_id == CX88_BOARD_NONE) { 620 if (core->active_type_id == CX88_BOARD_NONE) {
621 core->active_type_id = drv->type_id; 621 core->active_type_id = drv->type_id;
622 drv->advise_acquire(drv); 622 drv->advise_acquire(drv);
@@ -634,14 +634,14 @@ static int cx8802_request_release(struct cx8802_driver *drv)
634{ 634{
635 struct cx88_core *core = drv->core; 635 struct cx88_core *core = drv->core;
636 636
637 mutex_lock(&drv->core->lock);
637 if (drv->advise_release && --core->active_ref == 0) 638 if (drv->advise_release && --core->active_ref == 0)
638 { 639 {
639 mutex_lock(&drv->core->lock);
640 drv->advise_release(drv); 640 drv->advise_release(drv);
641 core->active_type_id = CX88_BOARD_NONE; 641 core->active_type_id = CX88_BOARD_NONE;
642 mutex_unlock(&drv->core->lock);
643 mpeg_dbg(1,"%s() Post release GPIO=%x\n", __FUNCTION__, cx_read(MO_GP0_IO)); 642 mpeg_dbg(1,"%s() Post release GPIO=%x\n", __FUNCTION__, cx_read(MO_GP0_IO));
644 } 643 }
644 mutex_unlock(&drv->core->lock);
645 645
646 return 0; 646 return 0;
647} 647}