5 May
2009
5 May
'09
5:51 p.m.
On Tue, May 05, 2009 at 10:30:48AM -0500, Timur Tabi wrote:
+static int cs4270_i2c_suspend(struct i2c_client *client, pm_message_t mesg) +{
- struct cs4270_private *cs4270 = i2c_get_clientdata(client);
- struct snd_soc_codec *codec = &cs4270->codec;
- int reg = snd_soc_read(codec, CS4270_PWRCTL);
- if (reg < 0)
return reg;
You check for an error code from snd_soc_read() here, but ...
- /* ... then disable the power-down bits */
- reg = snd_soc_read(codec, CS4270_PWRCTL);
you don't check for it here.
In cs4270_i2c_suspend(), snd_soc_read() can never return an error, because you're passing a hard-coded register address.
Ok - see the patch below.
Thanks, Daniel