aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-s3c2410/clock.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-01-12 13:42:23 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-01-12 13:42:23 -0500
commit00431707be0cc1236ee08459367872b57da5be29 (patch)
tree0a57cbf54f1fcc9ef2852e68e96c3b99e1b903d8 /arch/arm/mach-s3c2410/clock.c
parentf4619025a51747a3788fd1bb6bdc46e368a889a7 (diff)
[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.c11
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 @@
37#include <linux/interrupt.h> 37#include <linux/interrupt.h>
38#include <linux/ioport.h> 38#include <linux/ioport.h>
39#include <linux/clk.h> 39#include <linux/clk.h>
40#include <linux/mutex.h>
40 41
41#include <asm/hardware.h> 42#include <asm/hardware.h>
42#include <asm/atomic.h> 43#include <asm/atomic.h>
@@ -51,7 +52,7 @@
51/* clock information */ 52/* clock information */
52 53
53static LIST_HEAD(clocks); 54static LIST_HEAD(clocks);
54static DECLARE_MUTEX(clocks_sem); 55static DEFINE_MUTEX(clocks_mutex);
55 56
56/* old functions */ 57/* old functions */
57 58
@@ -102,7 +103,7 @@ struct clk *clk_get(struct device *dev, const char *id)
102 else 103 else
103 idno = to_platform_device(dev)->id; 104 idno = to_platform_device(dev)->id;
104 105
105 down(&clocks_sem); 106 mutex_lock(&clocks_mutex);
106 107
107 list_for_each_entry(p, &clocks, list) { 108 list_for_each_entry(p, &clocks, list) {
108 if (p->id == idno && 109 if (p->id == idno &&
@@ -126,7 +127,7 @@ struct clk *clk_get(struct device *dev, const char *id)
126 } 127 }
127 } 128 }
128 129
129 up(&clocks_sem); 130 mutex_unlock(&clocks_mutex);
130 return clk; 131 return clk;
131} 132}
132 133
@@ -362,9 +363,9 @@ int s3c24xx_register_clock(struct clk *clk)
362 363
363 /* add to the list of available clocks */ 364 /* add to the list of available clocks */
364 365
365 down(&clocks_sem); 366 mutex_lock(&clocks_mutex);
366 list_add(&clk->list, &clocks); 367 list_add(&clk->list, &clocks);
367 up(&clocks_sem); 368 mutex_unlock(&clocks_mutex);
368 369
369 return 0; 370 return 0;
370} 371}