diff options
Diffstat (limited to 'sound/soc/fsl/fsl-asoc-card.c')
| -rw-r--r-- | sound/soc/fsl/fsl-asoc-card.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index 71113886e494..70a6159430ed 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -536,7 +536,7 @@ static int hp_jack_event(struct notifier_block *nb, unsigned long event, void *data) { struct snd_soc_jack *jack = (struct snd_soc_jack *)data; - struct snd_soc_dapm_context *dapm = &jack->card->dapm; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(jack->card); if (event & SND_JACK_HEADPHONE) /* Disable speaker if headphone is plugged in */ @@ -553,7 +553,7 @@ static int mic_jack_event(struct notifier_block *nb, unsigned long event, void *data) { struct snd_soc_jack *jack = (struct snd_soc_jack *)data; - struct snd_soc_dapm_context *dapm = &jack->card->dapm; + struct snd_soc_dapm_context *dapm = snd_soc_card_to_dapm(jack->card); if (event & SND_JACK_MICROPHONE) /* Disable dmic if microphone is plugged in */ @@ -1045,8 +1045,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) * The notifier is initialized in snd_soc_card_jack_new(), then * snd_soc_jack_notifier_register can be called. */ - if (of_property_read_bool(np, "hp-det-gpios") || - of_property_read_bool(np, "hp-det-gpio") /* deprecated */) { + if (of_property_present(np, "hp-det-gpios") || + of_property_present(np, "hp-det-gpio") /* deprecated */) { ret = simple_util_init_jack(&priv->card, &priv->hp_jack, 1, NULL, "Headphone Jack"); if (ret) @@ -1055,8 +1055,8 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) snd_soc_jack_notifier_register(&priv->hp_jack.jack, &hp_jack_nb); } - if (of_property_read_bool(np, "mic-det-gpios") || - of_property_read_bool(np, "mic-det-gpio") /* deprecated */) { + if (of_property_present(np, "mic-det-gpios") || + of_property_present(np, "mic-det-gpio") /* deprecated */) { ret = simple_util_init_jack(&priv->card, &priv->mic_jack, 0, NULL, "Mic Jack"); if (ret) |
