lkml.org 
[lkml]   [2009]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[Patch RFC 33/37] arm: w90x900: convert semaphore to mutex
The semaphore is used as mutex so make it a mutex.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Wan ZongShun <mcuos.com@gmail.com>
---
arch/arm/mach-w90x900/mfp-w90p910.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

Index: linux-2.6-tip/arch/arm/mach-w90x900/mfp-w90p910.c
===================================================================
--- linux-2.6-tip.orig/arch/arm/mach-w90x900/mfp-w90p910.c
+++ linux-2.6-tip/arch/arm/mach-w90x900/mfp-w90p910.c
@@ -34,7 +34,7 @@
#define GPSELEI0 (0x01 << 26)
#define GPSELEI1 (0x01 << 27)

-static DECLARE_MUTEX(mfp_sem);
+static DEFINE_MUTEX(mfp_sem);

void mfp_set_groupf(struct device *dev)
{
@@ -43,7 +43,7 @@ void mfp_set_groupf(struct device *dev)

BUG_ON(!dev);

- down(&mfp_sem);
+ mutex_lock(&mfp_sem);

dev_id = dev_name(dev);

@@ -56,7 +56,7 @@ void mfp_set_groupf(struct device *dev)

__raw_writel(mfpen, REG_MFSEL);

- up(&mfp_sem);
+ mutex_unlock(&mfp_sem);
}
EXPORT_SYMBOL(mfp_set_groupf);

@@ -67,7 +67,7 @@ void mfp_set_groupc(struct device *dev)

BUG_ON(!dev);

- down(&mfp_sem);
+ mutex_lock(&mfp_sem);

dev_id = dev_name(dev);

@@ -86,7 +86,7 @@ void mfp_set_groupc(struct device *dev)

__raw_writel(mfpen, REG_MFSEL);

- up(&mfp_sem);
+ mutex_unlock(&mfp_sem);
}
EXPORT_SYMBOL(mfp_set_groupc);

@@ -97,7 +97,7 @@ void mfp_set_groupi(struct device *dev,

BUG_ON(!dev);

- down(&mfp_sem);
+ mutex_lock(&mfp_sem);

dev_id = dev_name(dev);

@@ -110,7 +110,7 @@ void mfp_set_groupi(struct device *dev,

__raw_writel(mfpen, REG_MFSEL);

- up(&mfp_sem);
+ mutex_unlock(&mfp_sem);
}
EXPORT_SYMBOL(mfp_set_groupi);




\
 
 \ /
  Last update: 2009-07-26 10:27    [W:0.252 / U:8.496 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site