diff options
author | Takashi Iwai <tiwai@suse.de> | 2010-11-03 13:56:08 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2010-11-03 13:56:08 +0100 |
commit | cf78c0c4267c37f2f98cb03a73c0a99c2cdaef87 (patch) | |
tree | a1e2d50637176bea7ca02d1bcef7417b9253a475 /sound/soc/codecs/tpa6130a2.c | |
parent | 29c798fecb9b846b363b0a02fa662ff42fc19426 (diff) | |
parent | 63f7526f26f0a9291ac3f7a986aa18ebfb61ec19 (diff) | |
download | talos-obmc-linux-cf78c0c4267c37f2f98cb03a73c0a99c2cdaef87.tar.gz talos-obmc-linux-cf78c0c4267c37f2f98cb03a73c0a99c2cdaef87.zip |
Merge branch 'for-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc-2.6 into fix/asoc
Diffstat (limited to 'sound/soc/codecs/tpa6130a2.c')
-rw-r--r-- | sound/soc/codecs/tpa6130a2.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index 329acc1a2074..83b5631b13a8 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c @@ -125,7 +125,7 @@ static int tpa6130a2_power(int power) data = i2c_get_clientdata(tpa6130a2_client); mutex_lock(&data->mutex); - if (power) { + if (power && !data->power_state) { /* Power on */ if (data->power_gpio >= 0) gpio_set_value(data->power_gpio, 1); @@ -153,7 +153,7 @@ static int tpa6130a2_power(int power) val = tpa6130a2_read(TPA6130A2_REG_CONTROL); val &= ~TPA6130A2_SWS; tpa6130a2_i2c_write(TPA6130A2_REG_CONTROL, val); - } else { + } else if (!power && data->power_state) { /* set SWS */ val = tpa6130a2_read(TPA6130A2_REG_CONTROL); val |= TPA6130A2_SWS; |