public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 21/30] mmc: Convert "mutex" to semaphore
       [not found] <20100907124636.880953480@linutronix.de>
@ 2010-09-07 14:33 ` Thomas Gleixner
  2010-09-14 12:47   ` Chris Ball
  0 siblings, 1 reply; 2+ messages in thread
From: Thomas Gleixner @ 2010-09-07 14:33 UTC (permalink / raw)
  To: LKML
  Cc: Andrew Morton, Ingo Molnar, Peter Zijlstra, Christoph Hellwig,
	linux-mmc

[-- Attachment #1: drivers-mmc-card-queue-sema.patch --]
[-- Type: text/plain, Size: 696 bytes --]

Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: linux-mmc@vger.kernel.org

---
 drivers/mmc/card/queue.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: linux-2.6/drivers/mmc/card/queue.c
===================================================================
--- linux-2.6.orig/drivers/mmc/card/queue.c
+++ linux-2.6/drivers/mmc/card/queue.c
@@ -209,7 +209,7 @@ int mmc_init_queue(struct mmc_queue *mq,
 		sg_init_table(mq->sg, host->max_phys_segs);
 	}
 
-	init_MUTEX(&mq->thread_sem);
+	sema_init(&mq->thread_sem, 1);
 
 	mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd");
 	if (IS_ERR(mq->thread)) {



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [patch 21/30] mmc: Convert "mutex" to semaphore
  2010-09-07 14:33 ` [patch 21/30] mmc: Convert "mutex" to semaphore Thomas Gleixner
@ 2010-09-14 12:47   ` Chris Ball
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Ball @ 2010-09-14 12:47 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: LKML, Andrew Morton, Ingo Molnar, Peter Zijlstra,
	Christoph Hellwig, linux-mmc

Hi,

On Tue, Sep 07, 2010 at 02:33:22PM -0000, Thomas Gleixner wrote:
> Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.
> 
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
> Cc: linux-mmc@vger.kernel.org
> 
> ---
>  drivers/mmc/card/queue.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/mmc/card/queue.c
> ===================================================================
> --- linux-2.6.orig/drivers/mmc/card/queue.c
> +++ linux-2.6/drivers/mmc/card/queue.c
> @@ -209,7 +209,7 @@ int mmc_init_queue(struct mmc_queue *mq,
>  		sg_init_table(mq->sg, host->max_phys_segs);
>  	}
>  
> -	init_MUTEX(&mq->thread_sem);
> +	sema_init(&mq->thread_sem, 1);
>  
>  	mq->thread = kthread_run(mmc_queue_thread, mq, "mmcqd");
>  	if (IS_ERR(mq->thread)) {
> 
> 

Thanks, applied to mmc-next.

-- 
Chris Ball   <cjb@laptop.org>   <http://printf.net/>
One Laptop Per Child

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-14 12:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20100907124636.880953480@linutronix.de>
2010-09-07 14:33 ` [patch 21/30] mmc: Convert "mutex" to semaphore Thomas Gleixner
2010-09-14 12:47   ` Chris Ball

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox