10 Jan
2011
10 Jan
'11
5:29 p.m.
On Mon, 2011-01-10 at 10:01 -0600, Timur Tabi wrote:
- reg = cs4270_read_reg_cache(codec, CS4270_MUTE);
- reg = snd_soc_read(codec, CS4270_MUTE); reg &= ~CS4270_MUTE_AUTO;
- ret = cs4270_i2c_write(codec, CS4270_MUTE, reg);
- ret = snd_soc_write(codec, CS4270_MUTE, reg); if (ret < 0) { dev_err(codec->dev, "i2c write failed\n"); return ret;
@@ -582,9 +521,9 @@ static int cs4270_probe(struct snd_soc_codec *codec) * re-enabled it by using the controls. */
- reg = cs4270_read_reg_cache(codec, CS4270_TRANS);
- reg = snd_soc_read(codec, CS4270_TRANS); reg &= ~(CS4270_TRANS_SOFT | CS4270_TRANS_ZERO);
- ret = cs4270_i2c_write(codec, CS4270_TRANS, reg);
- ret = snd_soc_write(codec, CS4270_TRANS, reg);
It'd be better to use snd_soc_update_bits() for all these.
Thanks, Dimitris