| From 0ff146a20360b761676a033e049c2ea593b7cdfe Mon Sep 17 00:00:00 2001 |
| From: Thomas Gleixner <tglx@linutronix.de> |
| Date: Sun, 26 Jul 2009 00:05:39 +0200 |
| Subject: [PATCH] dvb: Convert "mutex" to semaphore |
| |
| commit 90b1a4a56f1f4b02f260fa19467ed1bb7ad095b0 in tip. |
| |
| The usage of this "mutex" is non obvious and probably a completion in |
| some places. Make it a semaphore. |
| |
| Signed-off-by: Thomas Gleixner <tglx@linutronix.de> |
| Cc: Mauro Carvalho Chehab <mchehab@redhat.com> |
| Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> |
| --- |
| drivers/media/dvb/dvb-core/dvb_frontend.c | 4 ++-- |
| 1 files changed, 2 insertions(+), 2 deletions(-) |
| |
| diff --git a/drivers/media/dvb/dvb-core/dvb_frontend.c b/drivers/media/dvb/dvb-core/dvb_frontend.c |
| index 55ea260..29b4504 100644 |
| --- a/drivers/media/dvb/dvb-core/dvb_frontend.c |
| +++ b/drivers/media/dvb/dvb-core/dvb_frontend.c |
| @@ -694,7 +694,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 */ |
| @@ -2052,7 +2052,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); |
| -- |
| 1.7.0.4 |
| |