diff options
Diffstat (limited to 'sound/soc/codecs/tpa6130a2.c')
-rw-r--r-- | sound/soc/codecs/tpa6130a2.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/codecs/tpa6130a2.c b/sound/soc/codecs/tpa6130a2.c index d2c243095673..9d61a1d6fce0 100644 --- a/sound/soc/codecs/tpa6130a2.c +++ b/sound/soc/codecs/tpa6130a2.c | |||
@@ -29,7 +29,6 @@ | |||
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <sound/tpa6130a2-plat.h> | 30 | #include <sound/tpa6130a2-plat.h> |
31 | #include <sound/soc.h> | 31 | #include <sound/soc.h> |
32 | #include <sound/soc-dapm.h> | ||
33 | #include <sound/tlv.h> | 32 | #include <sound/tlv.h> |
34 | 33 | ||
35 | #include "tpa6130a2.h" | 34 | #include "tpa6130a2.h" |
@@ -128,9 +127,6 @@ static int tpa6130a2_power(int power) | |||
128 | 127 | ||
129 | mutex_lock(&data->mutex); | 128 | mutex_lock(&data->mutex); |
130 | if (power && !data->power_state) { | 129 | if (power && !data->power_state) { |
131 | /* Power on */ | ||
132 | if (data->power_gpio >= 0) | ||
133 | gpio_set_value(data->power_gpio, 1); | ||
134 | 130 | ||
135 | ret = regulator_enable(data->supply); | 131 | ret = regulator_enable(data->supply); |
136 | if (ret != 0) { | 132 | if (ret != 0) { |
@@ -138,6 +134,9 @@ static int tpa6130a2_power(int power) | |||
138 | "Failed to enable supply: %d\n", ret); | 134 | "Failed to enable supply: %d\n", ret); |
139 | goto exit; | 135 | goto exit; |
140 | } | 136 | } |
137 | /* Power on */ | ||
138 | if (data->power_gpio >= 0) | ||
139 | gpio_set_value(data->power_gpio, 1); | ||
141 | 140 | ||
142 | data->power_state = 1; | 141 | data->power_state = 1; |
143 | ret = tpa6130a2_initialize(); | 142 | ret = tpa6130a2_initialize(); |
@@ -390,16 +389,17 @@ static const struct snd_soc_dapm_route audio_map[] = { | |||
390 | int tpa6130a2_add_controls(struct snd_soc_codec *codec) | 389 | int tpa6130a2_add_controls(struct snd_soc_codec *codec) |
391 | { | 390 | { |
392 | struct tpa6130a2_data *data; | 391 | struct tpa6130a2_data *data; |
392 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
393 | 393 | ||
394 | if (tpa6130a2_client == NULL) | 394 | if (tpa6130a2_client == NULL) |
395 | return -ENODEV; | 395 | return -ENODEV; |
396 | 396 | ||
397 | data = i2c_get_clientdata(tpa6130a2_client); | 397 | data = i2c_get_clientdata(tpa6130a2_client); |
398 | 398 | ||
399 | snd_soc_dapm_new_controls(codec, tpa6130a2_dapm_widgets, | 399 | snd_soc_dapm_new_controls(dapm, tpa6130a2_dapm_widgets, |
400 | ARRAY_SIZE(tpa6130a2_dapm_widgets)); | 400 | ARRAY_SIZE(tpa6130a2_dapm_widgets)); |
401 | 401 | ||
402 | snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); | 402 | snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); |
403 | 403 | ||
404 | if (data->id == TPA6140A2) | 404 | if (data->id == TPA6140A2) |
405 | return snd_soc_add_controls(codec, tpa6140a2_controls, | 405 | return snd_soc_add_controls(codec, tpa6140a2_controls, |