[Patch RFC 28/37] dvb: Convert "mutex" to semaphore

From: Thomas Gleixner
Date: Sun Jul 26 2009 - 04:21:30 EST


The usage of this "mutex" is non obvious and probably a completions in
some places. Make it a semaphore.

Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: Mauro Carvalho Chehab <mchehab@xxxxxxxxxx>
---
drivers/media/dvb/dvb-core/dvb_frontend.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-2.6-tip/drivers/media/dvb/dvb-core/dvb_frontend.c
===================================================================
--- linux-2.6-tip.orig/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ linux-2.6-tip/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -678,7 +678,7 @@ static void dvb_frontend_stop(struct dvb

kthread_stop(fepriv->thread);

- init_MUTEX (&fepriv->sem);
+ semaphore_init(&fepriv->sem);
fepriv->state = FESTATE_IDLE;

/* paranoia check in case a signal arrived */
@@ -1909,7 +1909,7 @@ int dvb_register_frontend(struct dvb_ada
}
fepriv = fe->frontend_priv;

- init_MUTEX (&fepriv->sem);
+ semaphore_init(&fepriv->sem);
init_waitqueue_head (&fepriv->wait_queue);
init_waitqueue_head (&fepriv->events.wait_queue);
mutex_init(&fepriv->events.mtx);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/