ASoC: cs4270: introduce CS4270_I2C_INCR
authorDaniel Mack <daniel@caiaq.de>
Tue, 5 May 2009 09:25:00 +0000 (11:25 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 5 May 2009 18:16:41 +0000 (19:16 +0100)
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>
sound/soc/codecs/cs4270.c

index ece6ed6a844ff04ab7af0a7037aa3a12582ab58b..153124b2e3b130c5de65a36d71d0bb416e96e433 100644 (file)
@@ -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
@@ -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",