aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/sh/migor.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-09-19 11:03:16 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-09-19 11:03:16 -0400
commit382e30200244a80358b65dcc63ccba4424bf752a (patch)
treef52e563bde5aa5cdb22255a66c0f9fd2f58dd395 /sound/soc/sh/migor.c
parentd85a6d7bdc4eb88b31ca3c276ee5f0f1c8696795 (diff)
parentcbfa5184cc5f58627f08c7fad225424f565b439d (diff)
Merge branch 'for-2.6.36' into for-2.6.37
Diffstat (limited to 'sound/soc/sh/migor.c')
-rw-r--r--sound/soc/sh/migor.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c
index 866d78fb8398..f4620176a3ff 100644
--- a/sound/soc/sh/migor.c
+++ b/sound/soc/sh/migor.c
@@ -12,6 +12,7 @@
12#include <linux/firmware.h> 12#include <linux/firmware.h>
13#include <linux/module.h> 13#include <linux/module.h>
14 14
15#include <asm/clkdev.h>
15#include <asm/clock.h> 16#include <asm/clock.h>
16 17
17#include <cpu/sh7722.h> 18#include <cpu/sh7722.h>
@@ -40,12 +41,12 @@ static struct clk_ops siumckb_clk_ops = {
40}; 41};
41 42
42static struct clk siumckb_clk = { 43static struct clk siumckb_clk = {
43 .name = "siumckb_clk",
44 .id = -1,
45 .ops = &siumckb_clk_ops, 44 .ops = &siumckb_clk_ops,
46 .rate = 0, /* initialised at run-time */ 45 .rate = 0, /* initialised at run-time */
47}; 46};
48 47
48static struct clk_lookup *siumckb_lookup;
49
49static int migor_hw_params(struct snd_pcm_substream *substream, 50static int migor_hw_params(struct snd_pcm_substream *substream,
50 struct snd_pcm_hw_params *params) 51 struct snd_pcm_hw_params *params)
51{ 52{
@@ -177,6 +178,13 @@ static int __init migor_init(void)
177 if (ret < 0) 178 if (ret < 0)
178 return ret; 179 return ret;
179 180
181 siumckb_lookup = clkdev_alloc(&siumckb_clk, "siumckb_clk", NULL);
182 if (!siumckb_lookup) {
183 ret = -ENOMEM;
184 goto eclkdevalloc;
185 }
186 clkdev_add(siumckb_lookup);
187
180 /* Port number used on this machine: port B */ 188 /* Port number used on this machine: port B */
181 migor_snd_device = platform_device_alloc("soc-audio", 1); 189 migor_snd_device = platform_device_alloc("soc-audio", 1);
182 if (!migor_snd_device) { 190 if (!migor_snd_device) {
@@ -195,12 +203,15 @@ static int __init migor_init(void)
195epdevadd: 203epdevadd:
196 platform_device_put(migor_snd_device); 204 platform_device_put(migor_snd_device);
197epdevalloc: 205epdevalloc:
206 clkdev_drop(siumckb_lookup);
207eclkdevalloc:
198 clk_unregister(&siumckb_clk); 208 clk_unregister(&siumckb_clk);
199 return ret; 209 return ret;
200} 210}
201 211
202static void __exit migor_exit(void) 212static void __exit migor_exit(void)
203{ 213{
214 clkdev_drop(siumckb_lookup);
204 clk_unregister(&siumckb_clk); 215 clk_unregister(&siumckb_clk);
205 platform_device_unregister(migor_snd_device); 216 platform_device_unregister(migor_snd_device);
206} 217}