diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-01-12 18:42:23 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-12 18:42:23 +0000 |
commit | 00431707be0cc1236ee08459367872b57da5be29 (patch) | |
tree | 0a57cbf54f1fcc9ef2852e68e96c3b99e1b903d8 /arch/arm/mach-s3c2410/clock.c | |
parent | f4619025a51747a3788fd1bb6bdc46e368a889a7 (diff) | |
download | lwn-00431707be0cc1236ee08459367872b57da5be29.tar.gz lwn-00431707be0cc1236ee08459367872b57da5be29.zip |
[ARM] Convert some arm semaphores to mutexes
The arm clock semaphores are strict mutexes, convert them to the new
mutex implementation
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-s3c2410/clock.c')
-rw-r--r-- | arch/arm/mach-s3c2410/clock.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index fc09ba92d66a..af2f3d52b61b 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c @@ -37,6 +37,7 @@ #include <linux/interrupt.h> #include <linux/ioport.h> #include <linux/clk.h> +#include <linux/mutex.h> #include <asm/hardware.h> #include <asm/atomic.h> @@ -51,7 +52,7 @@ /* clock information */ static LIST_HEAD(clocks); -static DECLARE_MUTEX(clocks_sem); +static DEFINE_MUTEX(clocks_mutex); /* old functions */ @@ -102,7 +103,7 @@ struct clk *clk_get(struct device *dev, const char *id) else idno = to_platform_device(dev)->id; - down(&clocks_sem); + mutex_lock(&clocks_mutex); list_for_each_entry(p, &clocks, list) { if (p->id == idno && @@ -126,7 +127,7 @@ struct clk *clk_get(struct device *dev, const char *id) } } - up(&clocks_sem); + mutex_unlock(&clocks_mutex); return clk; } @@ -362,9 +363,9 @@ int s3c24xx_register_clock(struct clk *clk) /* add to the list of available clocks */ - down(&clocks_sem); + mutex_lock(&clocks_mutex); list_add(&clk->list, &clocks); - up(&clocks_sem); + mutex_unlock(&clocks_mutex); return 0; } |