V4L/DVB: dvb: Convert "mutex" to semaphore
authorThomas Gleixner <tglx@linutronix.de>
Tue, 7 Sep 2010 14:33:27 +0000 (11:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 03:06:08 +0000 (01:06 -0200)
Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-core/dvb_frontend.c

index 4d45b7d6b3fb248f267f4754601120c591e8bcb3..083ed151e9c9a288f34f28875f1dbd3d4ea8a6bd 100644 (file)
@@ -702,7 +702,7 @@ static void dvb_frontend_stop(struct dvb_frontend *fe)
 
        kthread_stop(fepriv->thread);
 
-       init_MUTEX (&fepriv->sem);
+       sema_init(&fepriv->sem, 1);
        fepriv->state = FESTATE_IDLE;
 
        /* paranoia check in case a signal arrived */
@@ -2061,7 +2061,7 @@ int dvb_register_frontend(struct dvb_adapter* dvb,
        }
        fepriv = fe->frontend_priv;
 
-       init_MUTEX (&fepriv->sem);
+       sema_init(&fepriv->sem, 1);
        init_waitqueue_head (&fepriv->wait_queue);
        init_waitqueue_head (&fepriv->events.wait_queue);
        mutex_init(&fepriv->events.mtx);