diff options
| author | Takashi Iwai <tiwai@suse.de> | 2010-09-25 11:57:49 -0400 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2010-09-25 11:57:49 -0400 |
| commit | b614e38e78ec1aacf80fd6124cfcc6e45925647c (patch) | |
| tree | 1a76b07ef87fbfe1e62ac8989071a811ddfd90ec | |
| parent | e68d3b316ab7b02a074edc4f770e6a746390cb7d (diff) | |
| parent | 0077ca0b5c986477e33451b797b6e7dc92a8bbc0 (diff) | |
Merge branch 'fix/asoc' into for-linus
| -rw-r--r-- | sound/soc/sh/migor.c | 15 | ||||
| -rw-r--r-- | sound/soc/soc-cache.c | 5 |
2 files changed, 16 insertions, 4 deletions
diff --git a/sound/soc/sh/migor.c b/sound/soc/sh/migor.c index b823a5c9b9bc..87e2b7fcbf17 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 | ||
| 42 | static struct clk siumckb_clk = { | 43 | static 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 | ||
| 48 | static struct clk_lookup *siumckb_lookup; | ||
| 49 | |||
| 49 | static int migor_hw_params(struct snd_pcm_substream *substream, | 50 | static 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 | { |
| @@ -180,6 +181,13 @@ static int __init migor_init(void) | |||
| 180 | if (ret < 0) | 181 | if (ret < 0) |
| 181 | return ret; | 182 | return ret; |
| 182 | 183 | ||
| 184 | siumckb_lookup = clkdev_alloc(&siumckb_clk, "siumckb_clk", NULL); | ||
| 185 | if (!siumckb_lookup) { | ||
| 186 | ret = -ENOMEM; | ||
| 187 | goto eclkdevalloc; | ||
| 188 | } | ||
| 189 | clkdev_add(siumckb_lookup); | ||
| 190 | |||
| 183 | /* Port number used on this machine: port B */ | 191 | /* Port number used on this machine: port B */ |
| 184 | migor_snd_device = platform_device_alloc("soc-audio", 1); | 192 | migor_snd_device = platform_device_alloc("soc-audio", 1); |
| 185 | if (!migor_snd_device) { | 193 | if (!migor_snd_device) { |
| @@ -200,12 +208,15 @@ static int __init migor_init(void) | |||
| 200 | epdevadd: | 208 | epdevadd: |
| 201 | platform_device_put(migor_snd_device); | 209 | platform_device_put(migor_snd_device); |
| 202 | epdevalloc: | 210 | epdevalloc: |
| 211 | clkdev_drop(siumckb_lookup); | ||
| 212 | eclkdevalloc: | ||
| 203 | clk_unregister(&siumckb_clk); | 213 | clk_unregister(&siumckb_clk); |
| 204 | return ret; | 214 | return ret; |
| 205 | } | 215 | } |
| 206 | 216 | ||
| 207 | static void __exit migor_exit(void) | 217 | static void __exit migor_exit(void) |
| 208 | { | 218 | { |
| 219 | clkdev_drop(siumckb_lookup); | ||
| 209 | clk_unregister(&siumckb_clk); | 220 | clk_unregister(&siumckb_clk); |
| 210 | platform_device_unregister(migor_snd_device); | 221 | platform_device_unregister(migor_snd_device); |
| 211 | } | 222 | } |
diff --git a/sound/soc/soc-cache.c b/sound/soc/soc-cache.c index adbc68ce9050..f6b0d2829ea9 100644 --- a/sound/soc/soc-cache.c +++ b/sound/soc/soc-cache.c | |||
| @@ -203,8 +203,9 @@ static int snd_soc_8_16_write(struct snd_soc_codec *codec, unsigned int reg, | |||
| 203 | data[1] = (value >> 8) & 0xff; | 203 | data[1] = (value >> 8) & 0xff; |
| 204 | data[2] = value & 0xff; | 204 | data[2] = value & 0xff; |
| 205 | 205 | ||
| 206 | if (!snd_soc_codec_volatile_register(codec, reg)) | 206 | if (!snd_soc_codec_volatile_register(codec, reg) |
| 207 | reg_cache[reg] = value; | 207 | && reg < codec->reg_cache_size) |
| 208 | reg_cache[reg] = value; | ||
| 208 | 209 | ||
| 209 | if (codec->cache_only) { | 210 | if (codec->cache_only) { |
| 210 | codec->cache_sync = 1; | 211 | codec->cache_sync = 1; |
