aboutsummaryrefslogtreecommitdiffstats
path: root/sound/i2c/other/ak4114.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/i2c/other/ak4114.c')
-rw-r--r--sound/i2c/other/ak4114.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sound/i2c/other/ak4114.c b/sound/i2c/other/ak4114.c
index d2b17c83fd33..adbfd5884d06 100644
--- a/sound/i2c/other/ak4114.c
+++ b/sound/i2c/other/ak4114.c
@@ -42,8 +42,8 @@ static void reg_write(struct ak4114 *ak4114, unsigned char reg, unsigned char va
42 ak4114->write(ak4114->private_data, reg, val); 42 ak4114->write(ak4114->private_data, reg, val);
43 if (reg <= AK4114_REG_INT1_MASK) 43 if (reg <= AK4114_REG_INT1_MASK)
44 ak4114->regmap[reg] = val; 44 ak4114->regmap[reg] = val;
45 else if (reg >= AK4114_REG_RXCSB0 && reg <= AK4114_REG_TXCSB4) 45 else if (reg >= AK4114_REG_TXCSB0 && reg <= AK4114_REG_TXCSB4)
46 ak4114->txcsb[reg-AK4114_REG_RXCSB0] = val; 46 ak4114->txcsb[reg-AK4114_REG_TXCSB0] = val;
47} 47}
48 48
49static inline unsigned char reg_read(struct ak4114 *ak4114, unsigned char reg) 49static inline unsigned char reg_read(struct ak4114 *ak4114, unsigned char reg)
@@ -127,7 +127,8 @@ void snd_ak4114_reg_write(struct ak4114 *chip, unsigned char reg, unsigned char
127 if (reg <= AK4114_REG_INT1_MASK) 127 if (reg <= AK4114_REG_INT1_MASK)
128 reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val); 128 reg_write(chip, reg, (chip->regmap[reg] & ~mask) | val);
129 else if (reg >= AK4114_REG_TXCSB0 && reg <= AK4114_REG_TXCSB4) 129 else if (reg >= AK4114_REG_TXCSB0 && reg <= AK4114_REG_TXCSB4)
130 reg_write(chip, reg, (chip->txcsb[reg] & ~mask) | val); 130 reg_write(chip, reg,
131 (chip->txcsb[reg-AK4114_REG_TXCSB0] & ~mask) | val);
131} 132}
132 133
133void snd_ak4114_reinit(struct ak4114 *chip) 134void snd_ak4114_reinit(struct ak4114 *chip)