Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 230330
b: refs/heads/master
c: c3acec2
h: refs/heads/master
v: v3
  • Loading branch information
Mark Brown committed Dec 3, 2010
1 parent f2cb9c9 commit 65c1f47
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ee46ebd0435d547c078859c719d7c892ff7ab2d
refs/heads/master: c3acec2671cc448bc549b06b561ae2454238e9a0
2 changes: 2 additions & 0 deletions trunk/include/sound/soc.h
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ struct snd_soc_codec {
void *control_data; /* codec control (i2c/3wire) data */
hw_write_t hw_write;
unsigned int (*hw_read)(struct snd_soc_codec *, unsigned int);
unsigned int (*read)(struct snd_soc_codec *, unsigned int);
int (*write)(struct snd_soc_codec *, unsigned int, unsigned int);
void *reg_cache;
const struct snd_soc_cache_ops *cache_ops;
struct mutex cache_rw_mutex;
Expand Down
4 changes: 2 additions & 2 deletions trunk/sound/soc/soc-cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,8 +728,8 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
return -EINVAL;
}

codec->driver->write = io_types[i].write;
codec->driver->read = io_types[i].read;
codec->write = io_types[i].write;
codec->read = io_types[i].read;

switch (control) {
case SND_SOC_CUSTOM:
Expand Down
6 changes: 4 additions & 2 deletions trunk/sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2077,7 +2077,7 @@ unsigned int snd_soc_read(struct snd_soc_codec *codec, unsigned int reg)
{
unsigned int ret;

ret = codec->driver->read(codec, reg);
ret = codec->read(codec, reg);
dev_dbg(codec->dev, "read %x => %x\n", reg, ret);
trace_snd_soc_reg_read(codec, reg, ret);

Expand All @@ -2090,7 +2090,7 @@ unsigned int snd_soc_write(struct snd_soc_codec *codec,
{
dev_dbg(codec->dev, "write %x = %x\n", reg, val);
trace_snd_soc_reg_write(codec, reg, val);
return codec->driver->write(codec, reg, val);
return codec->write(codec, reg, val);
}
EXPORT_SYMBOL_GPL(snd_soc_write);

Expand Down Expand Up @@ -3448,6 +3448,8 @@ int snd_soc_register_codec(struct device *dev,

INIT_LIST_HEAD(&codec->dapm.widgets);
INIT_LIST_HEAD(&codec->dapm.paths);
codec->write = codec_drv->write;
codec->read = codec_drv->read;
codec->dapm.bias_level = SND_SOC_BIAS_OFF;
codec->dapm.dev = dev;
codec->dapm.codec = codec;
Expand Down

0 comments on commit 65c1f47

Please sign in to comment.