aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-sa1100
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-06 16:20:10 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-06 16:20:10 -0400
commitc6799ade4ae04b53a5f677e5289116155ff01574 (patch)
tree3601b5e2387e39d62c207e4268c6cc5c68f2a364 /arch/arm/mach-sa1100
parentb7405e16435f710edfae6ba32bef4ca20d3de145 (diff)
parent5cd47155155a32e5b944ac9fc3f3dc578e429aa0 (diff)
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (82 commits) [ARM] Add comments marking in-use ptrace numbers [ARM] Move syscall saving out of the way of utrace [ARM] 4360/1: S3C24XX: regs-udc.h remove unused macro [ARM] 4358/1: S3C24XX: mach-qt2410.c: remove linux/mmc/protocol.h header [ARM] mm 10: allow memory type to be specified with ioremap [ARM] mm 9: add additional device memory types [ARM] mm 8: define mem_types table L1 bit 4 to be for ARMv6 [ARM] iop: add missing parens in macro [ARM] mm 7: remove duplicated __ioremap() prototypes ARM: OMAP: fix OMAP1 mpuio suspend/resume oops ARM: OMAP: MPUIO wake updates ARM: OMAP: speed up gpio irq handling ARM: OMAP: plat-omap changes for 2430 SDP ARM: OMAP: gpio object shrinkage, cleanup ARM: OMAP: /sys/kernel/debug/omap_gpio ARM: OMAP: Implement workaround for GPIO wakeup bug in OMAP2420 silicon ARM: OMAP: Enable 24xx GPIO autoidling [ARM] 4318/2: DSM-G600 Board Support [ARM] 4227/1: minor head.S fixups [ARM] 4328/1: Move i.MX UART regs to driver ...
Diffstat (limited to 'arch/arm/mach-sa1100')
-rw-r--r--arch/arm/mach-sa1100/clock.c24
-rw-r--r--arch/arm/mach-sa1100/irq.c1
-rw-r--r--arch/arm/mach-sa1100/neponset.c1
3 files changed, 13 insertions, 13 deletions
diff --git a/arch/arm/mach-sa1100/clock.c b/arch/arm/mach-sa1100/clock.c
index b1e8fd766c1a..fc97fe57ee6f 100644
--- a/arch/arm/mach-sa1100/clock.c
+++ b/arch/arm/mach-sa1100/clock.c
@@ -9,14 +9,17 @@
9#include <linux/string.h> 9#include <linux/string.h>
10#include <linux/clk.h> 10#include <linux/clk.h>
11#include <linux/spinlock.h> 11#include <linux/spinlock.h>
12#include <linux/mutex.h>
12 13
13#include <asm/hardware.h> 14#include <asm/hardware.h>
14#include <asm/semaphore.h>
15 15
16/*
17 * Very simple clock implementation - we only have one clock to
18 * deal with at the moment, so we only match using the "name".
19 */
16struct clk { 20struct clk {
17 struct list_head node; 21 struct list_head node;
18 unsigned long rate; 22 unsigned long rate;
19 struct module *owner;
20 const char *name; 23 const char *name;
21 unsigned int enabled; 24 unsigned int enabled;
22 void (*enable)(void); 25 void (*enable)(void);
@@ -24,21 +27,21 @@ struct clk {
24}; 27};
25 28
26static LIST_HEAD(clocks); 29static LIST_HEAD(clocks);
27static DECLARE_MUTEX(clocks_sem); 30static DEFINE_MUTEX(clocks_mutex);
28static DEFINE_SPINLOCK(clocks_lock); 31static DEFINE_SPINLOCK(clocks_lock);
29 32
30struct clk *clk_get(struct device *dev, const char *id) 33struct clk *clk_get(struct device *dev, const char *id)
31{ 34{
32 struct clk *p, *clk = ERR_PTR(-ENOENT); 35 struct clk *p, *clk = ERR_PTR(-ENOENT);
33 36
34 down(&clocks_sem); 37 mutex_lock(&clocks_mutex);
35 list_for_each_entry(p, &clocks, node) { 38 list_for_each_entry(p, &clocks, node) {
36 if (strcmp(id, p->name) == 0 && try_module_get(p->owner)) { 39 if (strcmp(id, p->name) == 0) {
37 clk = p; 40 clk = p;
38 break; 41 break;
39 } 42 }
40 } 43 }
41 up(&clocks_sem); 44 mutex_unlock(&clocks_mutex);
42 45
43 return clk; 46 return clk;
44} 47}
@@ -46,7 +49,6 @@ EXPORT_SYMBOL(clk_get);
46 49
47void clk_put(struct clk *clk) 50void clk_put(struct clk *clk)
48{ 51{
49 module_put(clk->owner);
50} 52}
51EXPORT_SYMBOL(clk_put); 53EXPORT_SYMBOL(clk_put);
52 54
@@ -109,18 +111,18 @@ static struct clk clk_gpio27 = {
109 111
110int clk_register(struct clk *clk) 112int clk_register(struct clk *clk)
111{ 113{
112 down(&clocks_sem); 114 mutex_lock(&clocks_mutex);
113 list_add(&clk->node, &clocks); 115 list_add(&clk->node, &clocks);
114 up(&clocks_sem); 116 mutex_unlock(&clocks_mutex);
115 return 0; 117 return 0;
116} 118}
117EXPORT_SYMBOL(clk_register); 119EXPORT_SYMBOL(clk_register);
118 120
119void clk_unregister(struct clk *clk) 121void clk_unregister(struct clk *clk)
120{ 122{
121 down(&clocks_sem); 123 mutex_lock(&clocks_mutex);
122 list_del(&clk->node); 124 list_del(&clk->node);
123 up(&clocks_sem); 125 mutex_unlock(&clocks_mutex);
124} 126}
125EXPORT_SYMBOL(clk_unregister); 127EXPORT_SYMBOL(clk_unregister);
126 128
diff --git a/arch/arm/mach-sa1100/irq.c b/arch/arm/mach-sa1100/irq.c
index 5642aeca079e..edf3347d9c5b 100644
--- a/arch/arm/mach-sa1100/irq.c
+++ b/arch/arm/mach-sa1100/irq.c
@@ -14,7 +14,6 @@
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/irq.h> 15#include <linux/irq.h>
16#include <linux/ioport.h> 16#include <linux/ioport.h>
17#include <linux/ptrace.h>
18#include <linux/sysdev.h> 17#include <linux/sysdev.h>
19 18
20#include <asm/hardware.h> 19#include <asm/hardware.h>
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c
index 075d4d1d63be..d7c038a0256b 100644
--- a/arch/arm/mach-sa1100/neponset.c
+++ b/arch/arm/mach-sa1100/neponset.c
@@ -4,7 +4,6 @@
4 */ 4 */
5#include <linux/kernel.h> 5#include <linux/kernel.h>
6#include <linux/init.h> 6#include <linux/init.h>
7#include <linux/ptrace.h>
8#include <linux/tty.h> 7#include <linux/tty.h>
9#include <linux/ioport.h> 8#include <linux/ioport.h>
10#include <linux/serial_core.h> 9#include <linux/serial_core.h>