aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/soc-jack.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/soc-jack.c')
-rw-r--r--sound/soc/soc-jack.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/soc-jack.c b/sound/soc/soc-jack.c
index 29159e1781d0..8862770aa221 100644
--- a/sound/soc/soc-jack.c
+++ b/sound/soc/soc-jack.c
@@ -32,14 +32,14 @@
32 * Returns zero if successful, or a negative error code on failure. 32 * Returns zero if successful, or a negative error code on failure.
33 * On success jack will be initialised. 33 * On success jack will be initialised.
34 */ 34 */
35int snd_soc_jack_new(struct snd_soc_card *card, const char *id, int type, 35int snd_soc_jack_new(struct snd_soc_codec *codec, const char *id, int type,
36 struct snd_soc_jack *jack) 36 struct snd_soc_jack *jack)
37{ 37{
38 jack->card = card; 38 jack->codec = codec;
39 INIT_LIST_HEAD(&jack->pins); 39 INIT_LIST_HEAD(&jack->pins);
40 BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier); 40 BLOCKING_INIT_NOTIFIER_HEAD(&jack->notifier);
41 41
42 return snd_jack_new(card->codec->card, id, type, &jack->jack); 42 return snd_jack_new(codec->card->snd_card, id, type, &jack->jack);
43} 43}
44EXPORT_SYMBOL_GPL(snd_soc_jack_new); 44EXPORT_SYMBOL_GPL(snd_soc_jack_new);
45 45
@@ -67,7 +67,7 @@ void snd_soc_jack_report(struct snd_soc_jack *jack, int status, int mask)
67 if (!jack) 67 if (!jack)
68 return; 68 return;
69 69
70 codec = jack->card->codec; 70 codec = jack->codec;
71 71
72 mutex_lock(&codec->mutex); 72 mutex_lock(&codec->mutex);
73 73
@@ -268,7 +268,7 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
268 ret = request_irq(gpio_to_irq(gpios[i].gpio), 268 ret = request_irq(gpio_to_irq(gpios[i].gpio),
269 gpio_handler, 269 gpio_handler,
270 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING, 270 IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
271 jack->card->dev->driver->name, 271 jack->codec->dev->driver->name,
272 &gpios[i]); 272 &gpios[i]);
273 if (ret) 273 if (ret)
274 goto err; 274 goto err;