]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ASoC: tegra: Remove superfluous snd_soc_jack_free_gpios() call
authorTakashi Iwai <tiwai@suse.de>
Tue, 22 Aug 2017 11:59:51 +0000 (13:59 +0200)
committerMark Brown <broonie@kernel.org>
Tue, 22 Aug 2017 12:39:07 +0000 (13:39 +0100)
Since jack gpios are managed via devres, we don't have to call
snd_jack_free_gpios() at release any longer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/tegra/tegra_alc5632.c
sound/soc/tegra/tegra_max98090.c
sound/soc/tegra/tegra_rt5640.c
sound/soc/tegra/tegra_rt5677.c
sound/soc/tegra/tegra_wm8903.c

index 0509902512ccd38a02376c0dc41a603d75f9a572..00383155d5f8b97127b6acc2d9a9033c8264fe61 100644 (file)
@@ -124,18 +124,6 @@ static int tegra_alc5632_asoc_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static int tegra_alc5632_card_remove(struct snd_soc_card *card)
-{
-       struct tegra_alc5632 *machine = snd_soc_card_get_drvdata(card);
-
-       if (gpio_is_valid(machine->gpio_hp_det)) {
-               snd_soc_jack_free_gpios(&tegra_alc5632_hs_jack, 1,
-                                       &tegra_alc5632_hp_jack_gpio);
-       }
-
-       return 0;
-}
-
 static struct snd_soc_dai_link tegra_alc5632_dai = {
        .name = "ALC5632",
        .stream_name = "ALC5632 PCM",
@@ -150,7 +138,6 @@ static struct snd_soc_dai_link tegra_alc5632_dai = {
 static struct snd_soc_card snd_soc_tegra_alc5632 = {
        .name = "tegra-alc5632",
        .owner = THIS_MODULE,
-       .remove = tegra_alc5632_card_remove,
        .dai_link = &tegra_alc5632_dai,
        .num_links = 1,
        .controls = tegra_alc5632_controls,
index c34a54d6e8121b9a6ba6c2b996112908eac25778..955067adf2d9474ddb8f867b3b74c7e3431d1673 100644 (file)
@@ -176,23 +176,6 @@ static int tegra_max98090_asoc_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static int tegra_max98090_card_remove(struct snd_soc_card *card)
-{
-       struct tegra_max98090 *machine = snd_soc_card_get_drvdata(card);
-
-       if (gpio_is_valid(machine->gpio_hp_det)) {
-               snd_soc_jack_free_gpios(&tegra_max98090_hp_jack, 1,
-                                       &tegra_max98090_hp_jack_gpio);
-       }
-
-       if (gpio_is_valid(machine->gpio_mic_det)) {
-               snd_soc_jack_free_gpios(&tegra_max98090_mic_jack, 1,
-                                       &tegra_max98090_mic_jack_gpio);
-       }
-
-       return 0;
-}
-
 static struct snd_soc_dai_link tegra_max98090_dai = {
        .name = "max98090",
        .stream_name = "max98090 PCM",
@@ -206,7 +189,6 @@ static struct snd_soc_dai_link tegra_max98090_dai = {
 static struct snd_soc_card snd_soc_tegra_max98090 = {
        .name = "tegra-max98090",
        .owner = THIS_MODULE,
-       .remove = tegra_max98090_card_remove,
        .dai_link = &tegra_max98090_dai,
        .num_links = 1,
        .controls = tegra_max98090_controls,
index 93a356802345aeefd00c4171fd55032c9802e15c..76ed6042d84d00495255efb2d433b5389acc77b1 100644 (file)
@@ -126,18 +126,6 @@ static int tegra_rt5640_asoc_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static int tegra_rt5640_card_remove(struct snd_soc_card *card)
-{
-       struct tegra_rt5640 *machine = snd_soc_card_get_drvdata(card);
-
-       if (gpio_is_valid(machine->gpio_hp_det)) {
-               snd_soc_jack_free_gpios(&tegra_rt5640_hp_jack, 1,
-                                       &tegra_rt5640_hp_jack_gpio);
-       }
-
-       return 0;
-}
-
 static struct snd_soc_dai_link tegra_rt5640_dai = {
        .name = "RT5640",
        .stream_name = "RT5640 PCM",
@@ -151,7 +139,6 @@ static struct snd_soc_dai_link tegra_rt5640_dai = {
 static struct snd_soc_card snd_soc_tegra_rt5640 = {
        .name = "tegra-rt5640",
        .owner = THIS_MODULE,
-       .remove = tegra_rt5640_card_remove,
        .dai_link = &tegra_rt5640_dai,
        .num_links = 1,
        .controls = tegra_rt5640_controls,
index ebf58d0e0f10b222c70d3db17ffec334c191358c..dc5a295d61e5fb3a8325b2e86d729bbc3bc3f556 100644 (file)
@@ -169,23 +169,6 @@ static int tegra_rt5677_asoc_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static int tegra_rt5677_card_remove(struct snd_soc_card *card)
-{
-       struct tegra_rt5677 *machine = snd_soc_card_get_drvdata(card);
-
-       if (gpio_is_valid(machine->gpio_hp_det)) {
-               snd_soc_jack_free_gpios(&tegra_rt5677_hp_jack, 1,
-                               &tegra_rt5677_hp_jack_gpio);
-       }
-
-       if (gpio_is_valid(machine->gpio_mic_present)) {
-               snd_soc_jack_free_gpios(&tegra_rt5677_mic_jack, 1,
-                               &tegra_rt5677_mic_jack_gpio);
-       }
-
-       return 0;
-}
-
 static struct snd_soc_dai_link tegra_rt5677_dai = {
        .name = "RT5677",
        .stream_name = "RT5677 PCM",
@@ -199,7 +182,6 @@ static struct snd_soc_dai_link tegra_rt5677_dai = {
 static struct snd_soc_card snd_soc_tegra_rt5677 = {
        .name = "tegra-rt5677",
        .owner = THIS_MODULE,
-       .remove = tegra_rt5677_card_remove,
        .dai_link = &tegra_rt5677_dai,
        .num_links = 1,
        .controls = tegra_rt5677_controls,
index dbfb49298ae8bea177237482f9d8dc58169bdf1e..ce498cc0914b8d677b305e2a6fe95181a6439bb3 100644 (file)
@@ -205,11 +205,6 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
        struct snd_soc_codec *codec = codec_dai->codec;
        struct tegra_wm8903 *machine = snd_soc_card_get_drvdata(card);
 
-       if (gpio_is_valid(machine->gpio_hp_det)) {
-               snd_soc_jack_free_gpios(&tegra_wm8903_hp_jack, 1,
-                                       &tegra_wm8903_hp_jack_gpio);
-       }
-
        wm8903_mic_detect(codec, NULL, 0, 0);
 
        return 0;