diff options
Diffstat (limited to 'arch/arm/common/clkdev.c')
-rw-r--r-- | arch/arm/common/clkdev.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c index aae5bc01acc8..dba4c1da63ed 100644 --- a/arch/arm/common/clkdev.c +++ b/arch/arm/common/clkdev.c | |||
@@ -18,6 +18,7 @@ | |||
18 | #include <linux/string.h> | 18 | #include <linux/string.h> |
19 | #include <linux/mutex.h> | 19 | #include <linux/mutex.h> |
20 | #include <linux/clk.h> | 20 | #include <linux/clk.h> |
21 | #include <linux/slab.h> | ||
21 | 22 | ||
22 | #include <asm/clkdev.h> | 23 | #include <asm/clkdev.h> |
23 | #include <mach/clkdev.h> | 24 | #include <mach/clkdev.h> |
@@ -32,7 +33,7 @@ static DEFINE_MUTEX(clocks_mutex); | |||
32 | * If an entry has a device ID, it must match | 33 | * If an entry has a device ID, it must match |
33 | * If an entry has a connection ID, it must match | 34 | * If an entry has a connection ID, it must match |
34 | * Then we take the most specific entry - with the following | 35 | * Then we take the most specific entry - with the following |
35 | * order of precidence: dev+con > dev only > con only. | 36 | * order of precedence: dev+con > dev only > con only. |
36 | */ | 37 | */ |
37 | static struct clk *clk_find(const char *dev_id, const char *con_id) | 38 | static struct clk *clk_find(const char *dev_id, const char *con_id) |
38 | { | 39 | { |
@@ -99,6 +100,16 @@ void clkdev_add(struct clk_lookup *cl) | |||
99 | } | 100 | } |
100 | EXPORT_SYMBOL(clkdev_add); | 101 | EXPORT_SYMBOL(clkdev_add); |
101 | 102 | ||
103 | void __init clkdev_add_table(struct clk_lookup *cl, size_t num) | ||
104 | { | ||
105 | mutex_lock(&clocks_mutex); | ||
106 | while (num--) { | ||
107 | list_add_tail(&cl->node, &clocks); | ||
108 | cl++; | ||
109 | } | ||
110 | mutex_unlock(&clocks_mutex); | ||
111 | } | ||
112 | |||
102 | #define MAX_DEV_ID 20 | 113 | #define MAX_DEV_ID 20 |
103 | #define MAX_CON_ID 16 | 114 | #define MAX_CON_ID 16 |
104 | 115 | ||