tangled
alpha
login
or
join now
tjh.dev
/
kernel
Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1
fork
atom
overview
issues
pulls
pipelines
Merge branch 'fix/asoc' into for-linus
Takashi Iwai
15 years ago
b614e38e
e68d3b31
+16
-4
2 changed files
expand all
collapse all
unified
split
sound
soc
sh
migor.c
soc-cache.c
+13
-2
sound/soc/sh/migor.c
···
12
12
#include <linux/firmware.h>
13
13
#include <linux/module.h>
14
14
15
15
+
#include <asm/clkdev.h>
15
16
#include <asm/clock.h>
16
17
17
18
#include <cpu/sh7722.h>
···
41
40
};
42
41
43
42
static struct clk siumckb_clk = {
44
44
-
.name = "siumckb_clk",
45
45
-
.id = -1,
46
43
.ops = &siumckb_clk_ops,
47
44
.rate = 0, /* initialised at run-time */
48
45
};
46
46
+
47
47
+
static struct clk_lookup *siumckb_lookup;
49
48
50
49
static int migor_hw_params(struct snd_pcm_substream *substream,
51
50
struct snd_pcm_hw_params *params)
···
181
180
if (ret < 0)
182
181
return ret;
183
182
183
183
+
siumckb_lookup = clkdev_alloc(&siumckb_clk, "siumckb_clk", NULL);
184
184
+
if (!siumckb_lookup) {
185
185
+
ret = -ENOMEM;
186
186
+
goto eclkdevalloc;
187
187
+
}
188
188
+
clkdev_add(siumckb_lookup);
189
189
+
184
190
/* Port number used on this machine: port B */
185
191
migor_snd_device = platform_device_alloc("soc-audio", 1);
186
192
if (!migor_snd_device) {
···
208
200
epdevadd:
209
201
platform_device_put(migor_snd_device);
210
202
epdevalloc:
203
203
+
clkdev_drop(siumckb_lookup);
204
204
+
eclkdevalloc:
211
205
clk_unregister(&siumckb_clk);
212
206
return ret;
213
207
}
214
208
215
209
static void __exit migor_exit(void)
216
210
{
211
211
+
clkdev_drop(siumckb_lookup);
217
212
clk_unregister(&siumckb_clk);
218
213
platform_device_unregister(migor_snd_device);
219
214
}
+3
-2
sound/soc/soc-cache.c
···
203
203
data[1] = (value >> 8) & 0xff;
204
204
data[2] = value & 0xff;
205
205
206
206
-
if (!snd_soc_codec_volatile_register(codec, reg))
207
207
-
reg_cache[reg] = value;
206
206
+
if (!snd_soc_codec_volatile_register(codec, reg)
207
207
+
&& reg < codec->reg_cache_size)
208
208
+
reg_cache[reg] = value;
208
209
209
210
if (codec->cache_only) {
210
211
codec->cache_sync = 1;