diff options
Diffstat (limited to 'sound/soc/soc-jack.c')
| -rw-r--r-- | sound/soc/soc-jack.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c index 1ab5fe04bfcc..0bb5cccd7766 100644 --- a/sound/soc/soc-jack.c +++ b/sound/soc/soc-jack.c | |||
| @@ -66,7 +66,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) | |||
| 66 | struct snd_soc_dapm_context *dapm; | 66 | struct snd_soc_dapm_context *dapm; |
| 67 | struct snd_soc_jack_pin *pin; | 67 | struct snd_soc_jack_pin *pin; |
| 68 | int enable; | 68 | int enable; |
| 69 | int oldstatus; | ||
| 70 | 69 | ||
| 71 | trace_snd_soc_jack_report(jack, mask, status); | 70 | trace_snd_soc_jack_report(jack, mask, status); |
| 72 | 71 | ||
| @@ -78,8 +77,6 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask) | |||
| 78 | 77 | ||
| 79 | mutex_lock(&jack->mutex); | 78 | mutex_lock(&jack->mutex); |
| 80 | 79 | ||
| 81 | oldstatus = jack->status; | ||
| 82 | |||
| 83 | jack->status &= ~mask; | 80 | jack->status &= ~mask; |
| 84 | jack->status |= status & mask; | 81 | jack->status |= status & mask; |
| 85 | 82 | ||
| @@ -172,12 +169,13 @@ int snd_soc_jack_add_pins(struct snd_soc_jack *jack, int count, | |||
| 172 | 169 | ||
| 173 | for (i = 0; i < count; i++) { | 170 | for (i = 0; i < count; i++) { |
| 174 | if (!pins[i].pin) { | 171 | if (!pins[i].pin) { |
| 175 | printk(KERN_ERR "No name for pin %d\n", i); | 172 | dev_err(jack->codec->dev, "ASoC: No name for pin %d\n", |
| 173 | i); | ||
| 176 | return -EINVAL; | 174 | return -EINVAL; |
| 177 | } | 175 | } |
| 178 | if (!pins[i].mask) { | 176 | if (!pins[i].mask) { |
| 179 | printk(KERN_ERR "No mask for pin %d (%s)\n", i, | 177 | dev_err(jack->codec->dev, "ASoC: No mask for pin %d" |
| 180 | pins[i].pin); | 178 | " (%s)\n", i, pins[i].pin); |
| 181 | return -EINVAL; | 179 | return -EINVAL; |
| 182 | } | 180 | } |
| 183 | 181 | ||
| @@ -297,13 +295,13 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | |||
| 297 | 295 | ||
| 298 | for (i = 0; i < count; i++) { | 296 | for (i = 0; i < count; i++) { |
| 299 | if (!gpio_is_valid(gpios[i].gpio)) { | 297 | if (!gpio_is_valid(gpios[i].gpio)) { |
| 300 | printk(KERN_ERR "Invalid gpio %d\n", | 298 | dev_err(jack->codec->dev, "ASoC: Invalid gpio %d\n", |
| 301 | gpios[i].gpio); | 299 | gpios[i].gpio); |
| 302 | ret = -EINVAL; | 300 | ret = -EINVAL; |
| 303 | goto undo; | 301 | goto undo; |
| 304 | } | 302 | } |
| 305 | if (!gpios[i].name) { | 303 | if (!gpios[i].name) { |
| 306 | printk(KERN_ERR "No name for gpio %d\n", | 304 | dev_err(jack->codec->dev, "ASoC: No name for gpio %d\n", |
| 307 | gpios[i].gpio); | 305 | gpios[i].gpio); |
| 308 | ret = -EINVAL; | 306 | ret = -EINVAL; |
| 309 | goto undo; | 307 | goto undo; |
| @@ -332,7 +330,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count, | |||
| 332 | if (gpios[i].wake) { | 330 | if (gpios[i].wake) { |
| 333 | ret = irq_set_irq_wake(gpio_to_irq(gpios[i].gpio), 1); | 331 | ret = irq_set_irq_wake(gpio_to_irq(gpios[i].gpio), 1); |
| 334 | if (ret != 0) | 332 | if (ret != 0) |
| 335 | printk(KERN_ERR | 333 | dev_err(jack->codec->dev, "ASoC: " |
| 336 | "Failed to mark GPIO %d as wake source: %d\n", | 334 | "Failed to mark GPIO %d as wake source: %d\n", |
| 337 | gpios[i].gpio, ret); | 335 | gpios[i].gpio, ret); |
| 338 | } | 336 | } |
