From 00431707be0cc1236ee08459367872b57da5be29 Mon Sep 17 00:00:00 2001 From: Arjan van de Ven Date: Thu, 12 Jan 2006 18:42:23 +0000 Subject: [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 Signed-off-by: Russell King --- arch/arm/mach-s3c2410/clock.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'arch/arm/mach-s3c2410') diff --git a/arch/arm/mach-s3c2410/clock.c b/arch/arm/mach-s3c2410/clock.c index fc09ba92d66..af2f3d52b61 100644 --- a/arch/arm/mach-s3c2410/clock.c +++ b/arch/arm/mach-s3c2410/clock.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include @@ -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; } -- cgit v1.2.3