Merge remote-tracking branches 'asoc/topic/hisi', 'asoc/topic/img', 'asoc/topic/jack...
authorMark Brown <broonie@kernel.org>
Fri, 1 Sep 2017 11:12:41 +0000 (12:12 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 1 Sep 2017 11:12:41 +0000 (12:12 +0100)
23 files changed:
sound/soc/fsl/imx-es8328.c
sound/soc/generic/simple-card.c
sound/soc/hisilicon/hi6210-i2s.c
sound/soc/img/img-i2s-in.c
sound/soc/img/img-i2s-out.c
sound/soc/img/img-parallel-out.c
sound/soc/img/img-spdif-in.c
sound/soc/img/img-spdif-out.c
sound/soc/intel/boards/byt-max98090.c
sound/soc/jz4740/jz4740-i2s.c
sound/soc/omap/ams-delta.c
sound/soc/omap/omap-twl4030.c
sound/soc/omap/rx51.c
sound/soc/pxa/hx4700.c
sound/soc/samsung/h1940_uda1380.c
sound/soc/samsung/rx1950_uda1380.c
sound/soc/samsung/smartq_wm8987.c
sound/soc/soc-jack.c
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 20e7400e2611e41ef057d9b2e22413a7c6a73c98..9953438086e4783f9fd6ea52a26eb99a0e9da00b 100644 (file)
@@ -203,9 +203,6 @@ static int imx_es8328_remove(struct platform_device *pdev)
 {
        struct imx_es8328_data *data = platform_get_drvdata(pdev);
 
-       snd_soc_jack_free_gpios(&headset_jack, ARRAY_SIZE(headset_jack_gpios),
-                               headset_jack_gpios);
-
        snd_soc_unregister_card(&data->card);
 
        return 0;
index dfaf48ff88b02b8f23413acc6b22552058cf372b..6959a74a6f4919bbb948476a94382872c37d8b85 100644 (file)
@@ -104,12 +104,6 @@ static int asoc_simple_card_init_jack(struct snd_soc_card *card,
        return 0;
 }
 
-static void asoc_simple_card_remove_jack(struct asoc_simple_jack *sjack)
-{
-       if (gpio_is_valid(sjack->gpio.gpio))
-               snd_soc_jack_free_gpios(&sjack->jack, 1, &sjack->gpio);
-}
-
 static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 {
        struct snd_soc_pcm_runtime *rtd = substream->private_data;
@@ -493,10 +487,6 @@ err:
 static int asoc_simple_card_remove(struct platform_device *pdev)
 {
        struct snd_soc_card *card = platform_get_drvdata(pdev);
-       struct simple_card_data *priv = snd_soc_card_get_drvdata(card);
-
-       asoc_simple_card_remove_jack(&priv->hp_jack);
-       asoc_simple_card_remove_jack(&priv->mic_jack);
 
        return asoc_simple_card_clean_reference(card);
 }
index b193d3beb25330ca6fe8ccb73cda9f8987eefb32..0c8f86d4020e7af3fb3a1ce2e23104f58eb662b8 100644 (file)
@@ -517,7 +517,7 @@ static int hi6210_i2s_dai_probe(struct snd_soc_dai *dai)
 }
 
 
-static struct snd_soc_dai_ops hi6210_i2s_dai_ops = {
+static const struct snd_soc_dai_ops hi6210_i2s_dai_ops = {
        .trigger        = hi6210_i2s_trigger,
        .hw_params      = hi6210_i2s_hw_params,
        .set_fmt        = hi6210_i2s_set_fmt,
index 0389203f85608edfababa699086278d4c51ccb69..567f9767fb73ed174473f7bee4d5df74b7b5cbea 100644 (file)
@@ -443,7 +443,7 @@ static int img_i2s_in_probe(struct platform_device *pdev)
                SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE;
        i2s->dai_driver.ops = &img_i2s_in_dai_ops;
 
-       rst = devm_reset_control_get(dev, "rst");
+       rst = devm_reset_control_get_exclusive(dev, "rst");
        if (IS_ERR(rst)) {
                if (PTR_ERR(rst) == -EPROBE_DEFER) {
                        ret = -EPROBE_DEFER;
index 5f997135a8aecdf5a89f8155d054c4544c697dad..78b7f6cd675b72a64d54749256525f2a7d19f417 100644 (file)
@@ -446,7 +446,7 @@ static int img_i2s_out_probe(struct platform_device *pdev)
 
        i2s->channel_base = base + (max_i2s_chan_pow_2 * 0x20);
 
-       i2s->rst = devm_reset_control_get(&pdev->dev, "rst");
+       i2s->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
        if (IS_ERR(i2s->rst)) {
                if (PTR_ERR(i2s->rst) != -EPROBE_DEFER)
                        dev_err(&pdev->dev, "No top level reset found\n");
index 33ceb207ee7040ab8f32b5ef5e7546099bd42617..23b0f0f6ec9cb698742bafc7f7a3b80a790679ce 100644 (file)
@@ -224,7 +224,7 @@ static int img_prl_out_probe(struct platform_device *pdev)
 
        prl->base = base;
 
-       prl->rst = devm_reset_control_get(&pdev->dev, "rst");
+       prl->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
        if (IS_ERR(prl->rst)) {
                if (PTR_ERR(prl->rst) != -EPROBE_DEFER)
                        dev_err(&pdev->dev, "No top level reset found\n");
index 4d9953d318af449e4ef5543a52c8f120de131444..8adfd65d43902896a482cf37a2b98f8c8abb935f 100644 (file)
@@ -727,7 +727,7 @@ static int img_spdif_in_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       rst = devm_reset_control_get(&pdev->dev, "rst");
+       rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
        if (IS_ERR(rst)) {
                if (PTR_ERR(rst) == -EPROBE_DEFER) {
                        ret = -EPROBE_DEFER;
index 08f93a5dadfe954b60cd5a86760598876134c6dd..383655da2e60d601a372d8f9229c0f5642ff9d62 100644 (file)
@@ -334,7 +334,7 @@ static int img_spdif_out_probe(struct platform_device *pdev)
 
        spdif->base = base;
 
-       spdif->rst = devm_reset_control_get(&pdev->dev, "rst");
+       spdif->rst = devm_reset_control_get_exclusive(&pdev->dev, "rst");
        if (IS_ERR(spdif->rst)) {
                if (PTR_ERR(spdif->rst) != -EPROBE_DEFER)
                        dev_err(&pdev->dev, "No top level reset found\n");
index 047be7fa0ce9f86a1462063b18184a8d984e1404..0f8b8209c0203d80ccc88aa0e65a5cc4cfe1807a 100644 (file)
@@ -173,20 +173,8 @@ static int byt_max98090_probe(struct platform_device *pdev)
        return 0;
 }
 
-static int byt_max98090_remove(struct platform_device *pdev)
-{
-       struct snd_soc_card *card = platform_get_drvdata(pdev);
-       struct byt_max98090_private *priv = snd_soc_card_get_drvdata(card);
-
-       snd_soc_jack_free_gpios(&priv->jack, ARRAY_SIZE(hs_jack_gpios),
-                               hs_jack_gpios);
-
-       return 0;
-}
-
 static struct platform_driver byt_max98090_driver = {
        .probe = byt_max98090_probe,
-       .remove = byt_max98090_remove,
        .driver = {
                .name = "byt-max98090",
                .pm = &snd_soc_pm_ops,
index 794a3499e567c3a907e70b8c1c57aafce6aab207..99394c03699819343d351a932ec84799001e7d2d 100644 (file)
@@ -133,6 +133,7 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream,
 {
        struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
        uint32_t conf, ctrl;
+       int ret;
 
        if (dai->active)
                return 0;
@@ -141,7 +142,9 @@ static int jz4740_i2s_startup(struct snd_pcm_substream *substream,
        ctrl |= JZ_AIC_CTRL_FLUSH;
        jz4740_i2s_write(i2s, JZ_REG_AIC_CTRL, ctrl);
 
-       clk_prepare_enable(i2s->clk_i2s);
+       ret = clk_prepare_enable(i2s->clk_i2s);
+       if (ret)
+               return ret;
 
        conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
        conf |= JZ_AIC_CONF_ENABLE;
@@ -352,11 +355,18 @@ static int jz4740_i2s_resume(struct snd_soc_dai *dai)
 {
        struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
        uint32_t conf;
+       int ret;
 
-       clk_prepare_enable(i2s->clk_aic);
+       ret = clk_prepare_enable(i2s->clk_aic);
+       if (ret)
+               return ret;
 
        if (dai->active) {
-               clk_prepare_enable(i2s->clk_i2s);
+               ret = clk_prepare_enable(i2s->clk_i2s);
+               if (ret) {
+                       clk_disable_unprepare(i2s->clk_aic);
+                       return ret;
+               }
 
                conf = jz4740_i2s_read(i2s, JZ_REG_AIC_CONF);
                conf |= JZ_AIC_CONF_ENABLE;
@@ -387,8 +397,11 @@ static int jz4740_i2s_dai_probe(struct snd_soc_dai *dai)
 {
        struct jz4740_i2s *i2s = snd_soc_dai_get_drvdata(dai);
        uint32_t conf;
+       int ret;
 
-       clk_prepare_enable(i2s->clk_aic);
+       ret = clk_prepare_enable(i2s->clk_aic);
+       if (ret)
+               return ret;
 
        jz4740_i2c_init_pcm_config(i2s);
        snd_soc_dai_init_dma_data(dai, &i2s->playback_dma_data,
index 16cc95fa45731b3f9ed6f47896b95b0eadf3a025..6c49f3d6fd965bcbfe984f2fcf457c2bc832181b 100644 (file)
@@ -513,15 +513,6 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static int ams_delta_card_remove(struct snd_soc_card *card)
-{
-       snd_soc_jack_free_gpios(&ams_delta_hook_switch,
-                       ARRAY_SIZE(ams_delta_hook_switch_gpios),
-                       ams_delta_hook_switch_gpios);
-
-       return 0;
-}
-
 /* DAI glue - connects codec <--> CPU */
 static struct snd_soc_dai_link ams_delta_dai_link = {
        .name = "CX20442",
@@ -540,7 +531,6 @@ static struct snd_soc_dai_link ams_delta_dai_link = {
 static struct snd_soc_card ams_delta_audio_card = {
        .name = "AMS_DELTA",
        .owner = THIS_MODULE,
-       .remove = ams_delta_card_remove,
        .dai_link = &ams_delta_dai_link,
        .num_links = 1,
 
index a24b0dedabb9b20501f98247ea1a0dc311f52d7b..cccc316743fa682680bdf2d1d6e70b9cf8cc2ef7 100644 (file)
@@ -208,18 +208,6 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd)
        return ret;
 }
 
-static int omap_twl4030_card_remove(struct snd_soc_card *card)
-{
-       struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card);
-
-       if (priv->jack_detect > 0)
-               snd_soc_jack_free_gpios(&priv->hs_jack,
-                                       ARRAY_SIZE(hs_jack_gpios),
-                                       hs_jack_gpios);
-
-       return 0;
-}
-
 /* Digital audio interface glue - connects codec <--> CPU */
 static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
        {
@@ -247,7 +235,6 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = {
 /* Audio machine driver */
 static struct snd_soc_card omap_twl4030_card = {
        .owner = THIS_MODULE,
-       .remove = omap_twl4030_card_remove,
        .dai_link = omap_twl4030_dai_links,
        .num_links = ARRAY_SIZE(omap_twl4030_dai_links),
 
index 3aeb65feaea1de397a7dfee59a0b5d036a22ebd5..57448bd5ad7703cb9084ce7409c4656721103f2f 100644 (file)
@@ -311,14 +311,6 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd)
        return err;
 }
 
-static int rx51_card_remove(struct snd_soc_card *card)
-{
-       snd_soc_jack_free_gpios(&rx51_av_jack, ARRAY_SIZE(rx51_av_jack_gpios),
-                               rx51_av_jack_gpios);
-
-       return 0;
-}
-
 /* Digital audio interface glue - connects codec <--> CPU */
 static struct snd_soc_dai_link rx51_dai[] = {
        {
@@ -361,7 +353,6 @@ static struct snd_soc_codec_conf rx51_codec_conf[] = {
 static struct snd_soc_card rx51_sound_card = {
        .name = "RX-51",
        .owner = THIS_MODULE,
-       .remove = rx51_card_remove,
        .dai_link = rx51_dai,
        .num_links = ARRAY_SIZE(rx51_dai),
        .aux_dev = rx51_aux_dev,
index a9ac881c2e143acef4e655e0056269ab813ff32b..6cdef5d4954e5cc397abe2613e363522c0f68d0c 100644 (file)
@@ -138,13 +138,6 @@ static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd)
        return err;
 }
 
-static int hx4700_card_remove(struct snd_soc_card *card)
-{
-       snd_soc_jack_free_gpios(&hs_jack, 1, &hs_jack_gpio);
-
-       return 0;
-}
-
 /* hx4700 digital audio interface glue - connects codec <--> CPU */
 static struct snd_soc_dai_link hx4700_dai = {
        .name = "ak4641",
@@ -163,7 +156,6 @@ static struct snd_soc_dai_link hx4700_dai = {
 static struct snd_soc_card snd_soc_card_hx4700 = {
        .name                   = "iPAQ hx4700",
        .owner                  = THIS_MODULE,
-       .remove                 = hx4700_card_remove,
        .dai_link               = &hx4700_dai,
        .num_links              = 1,
        .dapm_widgets           = hx4700_dapm_widgets,
index 5f5825faeb2a4331177595eaabcd0600b9d2476e..051935162d7bf30ef7d26b293257d5d8a4fae7e8 100644 (file)
@@ -170,14 +170,6 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static int h1940_uda1380_card_remove(struct snd_soc_card *card)
-{
-       snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
-               hp_jack_gpios);
-
-       return 0;
-}
-
 /* s3c24xx digital audio interface glue - connects codec <--> CPU */
 static struct snd_soc_dai_link h1940_uda1380_dai[] = {
        {
@@ -197,7 +189,6 @@ static struct snd_soc_dai_link h1940_uda1380_dai[] = {
 static struct snd_soc_card h1940_asoc = {
        .name = "h1940",
        .owner = THIS_MODULE,
-       .remove = h1940_uda1380_card_remove,
        .dai_link = h1940_uda1380_dai,
        .num_links = ARRAY_SIZE(h1940_uda1380_dai),
 
index fa096abe9e75689b58e46bb818810838a78c6080..a064ca7d78c352e267ec11bd2e7cfcef0200f8c5 100644 (file)
@@ -31,7 +31,6 @@
 #include "s3c24xx-i2s.h"
 
 static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd);
-static int rx1950_uda1380_card_remove(struct snd_soc_card *card);
 static int rx1950_startup(struct snd_pcm_substream *substream);
 static int rx1950_hw_params(struct snd_pcm_substream *substream,
                                struct snd_pcm_hw_params *params);
@@ -118,7 +117,6 @@ static const struct snd_soc_dapm_route audio_map[] = {
 static struct snd_soc_card rx1950_asoc = {
        .name = "rx1950",
        .owner = THIS_MODULE,
-       .remove = rx1950_uda1380_card_remove,
        .dai_link = rx1950_uda1380_dai,
        .num_links = ARRAY_SIZE(rx1950_uda1380_dai),
 
@@ -219,14 +217,6 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd)
        return 0;
 }
 
-static int rx1950_uda1380_card_remove(struct snd_soc_card *card)
-{
-       snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios),
-               hp_jack_gpios);
-
-       return 0;
-}
-
 static int __init rx1950_init(void)
 {
        int ret;
index 425ee2ba37f0725ce6873a5dcde3c2f1d52a46a8..cf0f54e652c16c6558d94d4dbf2505a6cb080d39 100644 (file)
@@ -160,14 +160,6 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd)
        return err;
 }
 
-static int smartq_wm8987_card_remove(struct snd_soc_card *card)
-{
-       snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios),
-                               smartq_jack_gpios);
-
-       return 0;
-}
-
 static struct snd_soc_dai_link smartq_dai[] = {
        {
                .name           = "wm8987",
@@ -186,7 +178,6 @@ static struct snd_soc_dai_link smartq_dai[] = {
 static struct snd_soc_card snd_soc_smartq = {
        .name = "SmartQ",
        .owner = THIS_MODULE,
-       .remove = smartq_wm8987_card_remove,
        .dai_link = smartq_dai,
        .num_links = ARRAY_SIZE(smartq_dai),
 
index 2f9f496ab14fdde937e43b108d62c01e90f76266..99902ae1a2d95d9c6e295be964929a7b68c7acca 100644 (file)
 #include <linux/suspend.h>
 #include <trace/events/asoc.h>
 
+struct jack_gpio_tbl {
+       int count;
+       struct snd_soc_jack *jack;
+       struct snd_soc_jack_gpio *gpios;
+};
+
 /**
  * snd_soc_codec_set_jack - configure codec jack.
  * @codec: CODEC
@@ -36,7 +42,7 @@ int snd_soc_codec_set_jack(struct snd_soc_codec *codec,
        if (codec->driver->set_jack)
                return codec->driver->set_jack(codec, jack, data);
        else
-               return -EINVAL;
+               return -ENOTSUPP;
 }
 EXPORT_SYMBOL_GPL(snd_soc_codec_set_jack);
 
@@ -355,6 +361,28 @@ static int snd_soc_jack_pm_notifier(struct notifier_block *nb,
        return NOTIFY_DONE;
 }
 
+static void jack_free_gpios(struct snd_soc_jack *jack, int count,
+                           struct snd_soc_jack_gpio *gpios)
+{
+       int i;
+
+       for (i = 0; i < count; i++) {
+               gpiod_unexport(gpios[i].desc);
+               unregister_pm_notifier(&gpios[i].pm_notifier);
+               free_irq(gpiod_to_irq(gpios[i].desc), &gpios[i]);
+               cancel_delayed_work_sync(&gpios[i].work);
+               gpiod_put(gpios[i].desc);
+               gpios[i].jack = NULL;
+       }
+}
+
+static void jack_devres_free_gpios(struct device *dev, void *res)
+{
+       struct jack_gpio_tbl *tbl = res;
+
+       jack_free_gpios(tbl->jack, tbl->count, tbl->gpios);
+}
+
 /**
  * snd_soc_jack_add_gpios - Associate GPIO pins with an ASoC jack
  *
@@ -369,6 +397,14 @@ int snd_soc_jack_add_gpios(struct snd_soc_jack *jack, int count,
                        struct snd_soc_jack_gpio *gpios)
 {
        int i, ret;
+       struct jack_gpio_tbl *tbl;
+
+       tbl = devres_alloc(jack_devres_free_gpios, sizeof(*tbl), GFP_KERNEL);
+       if (!tbl)
+               return -ENOMEM;
+       tbl->jack = jack;
+       tbl->count = count;
+       tbl->gpios = gpios;
 
        for (i = 0; i < count; i++) {
                if (!gpios[i].name) {
@@ -446,12 +482,14 @@ got_gpio:
                                      msecs_to_jiffies(gpios[i].debounce_time));
        }
 
+       devres_add(jack->card->dev, tbl);
        return 0;
 
 err:
        gpio_free(gpios[i].gpio);
 undo:
-       snd_soc_jack_free_gpios(jack, i, gpios);
+       jack_free_gpios(jack, i, gpios);
+       devres_free(tbl);
 
        return ret;
 }
@@ -493,16 +531,8 @@ EXPORT_SYMBOL_GPL(snd_soc_jack_add_gpiods);
 void snd_soc_jack_free_gpios(struct snd_soc_jack *jack, int count,
                        struct snd_soc_jack_gpio *gpios)
 {
-       int i;
-
-       for (i = 0; i < count; i++) {
-               gpiod_unexport(gpios[i].desc);
-               unregister_pm_notifier(&gpios[i].pm_notifier);
-               free_irq(gpiod_to_irq(gpios[i].desc), &gpios[i]);
-               cancel_delayed_work_sync(&gpios[i].work);
-               gpiod_put(gpios[i].desc);
-               gpios[i].jack = NULL;
-       }
+       jack_free_gpios(jack, count, gpios);
+       devres_destroy(jack->card->dev, jack_devres_free_gpios, NULL, NULL);
 }
 EXPORT_SYMBOL_GPL(snd_soc_jack_free_gpios);
 #endif /* CONFIG_GPIOLIB */
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..05f95944669ad9c3607ac6ae02ac62ea72ccae1d 100644 (file)
@@ -203,12 +203,6 @@ static int tegra_wm8903_remove(struct snd_soc_card *card)
                snd_soc_get_pcm_runtime(card, card->dai_link[0].name);
        struct snd_soc_dai *codec_dai = rtd->codec_dai;
        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);