diff options
Diffstat (limited to 'arch/arm/common/clkdev.c')
-rw-r--r-- | arch/arm/common/clkdev.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/arm/common/clkdev.c b/arch/arm/common/clkdev.c index 5589444ff437..f37afd9422f3 100644 --- a/arch/arm/common/clkdev.c +++ b/arch/arm/common/clkdev.c | |||
@@ -135,6 +135,24 @@ struct clk_lookup *clkdev_alloc(struct clk *clk, const char *con_id, | |||
135 | } | 135 | } |
136 | EXPORT_SYMBOL(clkdev_alloc); | 136 | EXPORT_SYMBOL(clkdev_alloc); |
137 | 137 | ||
138 | int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, | ||
139 | struct device *dev) | ||
140 | { | ||
141 | struct clk *r = clk_get(dev, id); | ||
142 | struct clk_lookup *l; | ||
143 | |||
144 | if (IS_ERR(r)) | ||
145 | return PTR_ERR(r); | ||
146 | |||
147 | l = clkdev_alloc(r, alias, alias_dev_name); | ||
148 | clk_put(r); | ||
149 | if (!l) | ||
150 | return -ENODEV; | ||
151 | clkdev_add(l); | ||
152 | return 0; | ||
153 | } | ||
154 | EXPORT_SYMBOL(clk_add_alias); | ||
155 | |||
138 | /* | 156 | /* |
139 | * clkdev_drop - remove a clock dynamically allocated | 157 | * clkdev_drop - remove a clock dynamically allocated |
140 | */ | 158 | */ |