ASoC: h1980_uda1380: Register jacks at the card level
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 4 Mar 2015 09:33:33 +0000 (10:33 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 4 Mar 2015 17:10:44 +0000 (17:10 +0000)
The jacks are card level elements so use snd_soc_card_jack_new() instead of
snd_soc_jack_new() to register them.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/samsung/h1940_uda1380.c

index 59b044255b781c68c733f30f397ff266059ac507..c72e9fb26658ce17036761164e6fd9e083618841 100644 (file)
@@ -162,13 +162,8 @@ static struct platform_device *s3c24xx_snd_device;
 
 static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
 {
-       struct snd_soc_codec *codec = rtd->codec;
-
-       snd_soc_jack_new(codec, "Headphone Jack", SND_JACK_HEADPHONE,
-               &hp_jack);
-
-       snd_soc_jack_add_pins(&hp_jack, ARRAY_SIZE(hp_jack_pins),
-               hp_jack_pins);
+       snd_soc_card_jack_new(rtd->card, "Headphone Jack", SND_JACK_HEADPHONE,
+               &hp_jack, hp_jack_pins, ARRAY_SIZE(hp_jack_pins));
 
        snd_soc_jack_add_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
                hp_jack_gpios);