ASoC: cht_bsw_rt5645: Register jacks at the card level
authorLars-Peter Clausen <lars@metafoo.de>
Wed, 4 Mar 2015 09:33:23 +0000 (10:33 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 4 Mar 2015 17:09:52 +0000 (17:09 +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/intel/cht_bsw_rt5645.c

index bd29617..0bfca21 100644 (file)
@@ -169,17 +169,17 @@ static int cht_codec_init(struct snd_soc_pcm_runtime *runtime)
                return ret;
        }
 
-       ret = snd_soc_jack_new(codec, "Headphone Jack",
-                               SND_JACK_HEADPHONE,
-                               &ctx->hp_jack);
+       ret = snd_soc_card_jack_new(runtime->card, "Headphone Jack",
+                                   SND_JACK_HEADPHONE, &ctx->hp_jack,
+                                   NULL, 0);
        if (ret) {
                dev_err(runtime->dev, "HP jack creation failed %d\n", ret);
                return ret;
        }
 
-       ret = snd_soc_jack_new(codec, "Mic Jack",
-                               SND_JACK_MICROPHONE,
-                               &ctx->mic_jack);
+       ret = snd_soc_card_jack_new(runtime->card, "Mic Jack",
+                                   SND_JACK_MICROPHONE, &ctx->mic_jack,
+                                   NULL, 0);
        if (ret) {
                dev_err(runtime->dev, "Mic jack creation failed %d\n", ret);
                return ret;