diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-08-18 17:17:37 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-08-18 17:17:37 -0400 |
commit | 1a1dc50442ef1a3e5ef938a8541466ac38d163a9 (patch) | |
tree | c2883f1e744af83213e24f537f2d7102e381b55e /arch/arm/mach-pxa/clock.c | |
parent | faa64c93ae3fa3b3c97e502e60ce8430ab61cd9d (diff) | |
parent | 908cbc10135755ea055feaa6a8ec209edfe489be (diff) |
Merge branch 'for_rmk_17' of git://git.mnementh.co.uk/linux-2.6-im
Diffstat (limited to 'arch/arm/mach-pxa/clock.c')
-rw-r--r-- | arch/arm/mach-pxa/clock.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index c01eea88f78..ca8e2053815 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c | |||
@@ -125,3 +125,28 @@ void clks_register(struct clk *clks, size_t num) | |||
125 | list_add(&clks[i].node, &clocks); | 125 | list_add(&clks[i].node, &clocks); |
126 | mutex_unlock(&clocks_mutex); | 126 | mutex_unlock(&clocks_mutex); |
127 | } | 127 | } |
128 | |||
129 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, | ||
130 | struct device *dev) | ||
131 | { | ||
132 | struct clk *r = clk_lookup(dev, id); | ||
133 | struct clk *new; | ||
134 | |||
135 | if (!r) | ||
136 | return -ENODEV; | ||
137 | |||
138 | new = kzalloc(sizeof(struct clk), GFP_KERNEL); | ||
139 | |||
140 | if (!new) | ||
141 | return -ENOMEM; | ||
142 | |||
143 | new->name = alias; | ||
144 | new->dev = alias_dev; | ||
145 | new->other = r; | ||
146 | |||
147 | mutex_lock(&clocks_mutex); | ||
148 | list_add(&new->node, &clocks); | ||
149 | mutex_unlock(&clocks_mutex); | ||
150 | |||
151 | return 0; | ||
152 | } | ||