Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 187012
b: refs/heads/master
c: e555317
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Mark Brown committed Mar 3, 2010
1 parent 87a4400 commit 84ed2f2
Show file tree
Hide file tree
Showing 2 changed files with 3 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: bb1c04784d39b95a4382bd283f3048c4eb859b58
refs/heads/master: e555317c083fda01f516d2153589e82514e20e70
6 changes: 2 additions & 4 deletions trunk/sound/soc/codecs/ak4104.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,10 @@ static int ak4104_spi_write(struct snd_soc_codec *codec, unsigned int reg,
if (reg >= codec->reg_cache_size)
return -EINVAL;

reg &= AK4104_REG_MASK;
reg |= AK4104_WRITE;

/* only write to the hardware if value has changed */
if (cache[reg] != value) {
u8 tmp[2] = { reg, value };
u8 tmp[2] = { (reg & AK4104_REG_MASK) | AK4104_WRITE, value };

if (spi_write(spi, tmp, sizeof(tmp))) {
dev_err(&spi->dev, "SPI write failed\n");
return -EIO;
Expand Down

0 comments on commit 84ed2f2

Please sign in to comment.