Skip to content

Commit

Permalink
ASoC: cs4270: introduce CS4270_I2C_INCR
Browse files Browse the repository at this point in the history
Replace the magic 0x80 value with a suitable macro definition.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
  • Loading branch information
Daniel Mack authored and Mark Brown committed May 5, 2009
1 parent e6e5512 commit 80ab881
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/codecs/cs4270.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
#define CS4270_FIRSTREG 0x01
#define CS4270_LASTREG 0x08
#define CS4270_NUMREGS (CS4270_LASTREG - CS4270_FIRSTREG + 1)
#define CS4270_I2C_INCR 0x80

/* Bit masks for the CS4270 registers */
#define CS4270_CHIPID_ID 0xF0
Expand Down Expand Up @@ -296,7 +297,7 @@ static int cs4270_fill_cache(struct snd_soc_codec *codec)
s32 length;

length = i2c_smbus_read_i2c_block_data(i2c_client,
CS4270_FIRSTREG | 0x80, CS4270_NUMREGS, cache);
CS4270_FIRSTREG | CS4270_I2C_INCR, CS4270_NUMREGS, cache);

if (length != CS4270_NUMREGS) {
dev_err(codec->dev, "i2c read failure, addr=0x%x\n",
Expand Down

0 comments on commit 80ab881

Please sign in to comment.