diff options
Diffstat (limited to 'arch/arm/mach-s3c2410')
-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 @@ | |||
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 | ||
53 | static LIST_HEAD(clocks); | 54 | static LIST_HEAD(clocks); |
54 | static DECLARE_MUTEX(clocks_sem); | 55 | static 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 | } |