From dc568f876ad5d2962309c3d41dae879637de37de Mon Sep 17 00:00:00 2001 From: Peter Ujfalusi Date: Wed, 16 Apr 2014 15:46:22 +0300 Subject: ASoC: omap-twl4030: Use the same name/node for platform as the cpu_dai Now that the platform driver is registered with the cpu_dai's device we can use the same name/node for it. Signed-off-by: Peter Ujfalusi Signed-off-by: Mark Brown --- sound/soc/omap/omap-twl4030.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'sound/soc/omap/omap-twl4030.c') diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c index 6a8d6b5f160d..0c83e206e957 100644 --- a/sound/soc/omap/omap-twl4030.c +++ b/sound/soc/omap/omap-twl4030.c @@ -239,7 +239,7 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = { .stream_name = "TWL4030 HiFi", .cpu_dai_name = "omap-mcbsp.2", .codec_dai_name = "twl4030-hifi", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.2", .codec_name = "twl4030-codec", .init = omap_twl4030_init, .ops = &omap_twl4030_ops, @@ -249,7 +249,7 @@ static struct snd_soc_dai_link omap_twl4030_dai_links[] = { .stream_name = "TWL4030 Voice", .cpu_dai_name = "omap-mcbsp.3", .codec_dai_name = "twl4030-voice", - .platform_name = "omap-pcm-audio", + .platform_name = "omap-mcbsp.2", .codec_name = "twl4030-codec", .dai_fmt = SND_SOC_DAIFMT_DSP_A | SND_SOC_DAIFMT_IB_NF | SND_SOC_DAIFMT_CBM_CFM, @@ -299,12 +299,18 @@ static int omap_twl4030_probe(struct platform_device *pdev) omap_twl4030_dai_links[0].cpu_dai_name = NULL; omap_twl4030_dai_links[0].cpu_of_node = dai_node; + omap_twl4030_dai_links[0].platform_name = NULL; + omap_twl4030_dai_links[0].platform_of_node = dai_node; + dai_node = of_parse_phandle(node, "ti,mcbsp-voice", 0); if (!dai_node) { card->num_links = 1; } else { omap_twl4030_dai_links[1].cpu_dai_name = NULL; omap_twl4030_dai_links[1].cpu_of_node = dai_node; + + omap_twl4030_dai_links[1].platform_name = NULL; + omap_twl4030_dai_links[1].platform_of_node = dai_node; } priv->jack_detect = of_get_named_gpio(node, -- cgit v1.2.3 From 0596f70069bb5ab34eea980c14fad1041f2abae5 Mon Sep 17 00:00:00 2001 From: Lars-Peter Clausen Date: Mon, 19 May 2014 11:41:46 +0200 Subject: ASoC: omap: Replace instances of rtd->codec->card with rtd->card No need to go via the CODEC to get a pointer to the card. This will help to eventually remove the card field from the snd_soc_codec struct. Signed-off-by: Lars-Peter Clausen Acked-by: Jarkko Nikula Signed-off-by: Mark Brown --- sound/soc/omap/omap-abe-twl6040.c | 5 ++--- sound/soc/omap/omap-twl4030.c | 5 ++--- sound/soc/omap/rx51.c | 2 +- 3 files changed, 5 insertions(+), 7 deletions(-) (limited to 'sound/soc/omap/omap-twl4030.c') diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c index 1a89e5b1be16..cec836ed0c01 100644 --- a/sound/soc/omap/omap-abe-twl6040.c +++ b/sound/soc/omap/omap-abe-twl6040.c @@ -47,8 +47,7 @@ static int omap_abe_hw_params(struct snd_pcm_substream *substream, { struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_card *card = codec->card; + struct snd_soc_card *card = rtd->card; struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card); int clk_id, freq; int ret; @@ -168,7 +167,7 @@ static const struct snd_soc_dapm_route audio_map[] = { static int omap_abe_twl6040_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_card *card = codec->card; + struct snd_soc_card *card = rtd->card; struct abe_twl6040 *priv = snd_soc_card_get_drvdata(card); int hs_trim; int ret = 0; diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c index 0c83e206e957..64141db311b2 100644 --- a/sound/soc/omap/omap-twl4030.c +++ b/sound/soc/omap/omap-twl4030.c @@ -55,8 +55,7 @@ static int omap_twl4030_hw_params(struct snd_pcm_substream *substream, struct snd_soc_pcm_runtime *rtd = substream->private_data; struct snd_soc_dai *codec_dai = rtd->codec_dai; struct snd_soc_dai *cpu_dai = rtd->cpu_dai; - struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_card *card = codec->card; + struct snd_soc_card *card = rtd->card; unsigned int fmt; int ret; @@ -179,7 +178,7 @@ static inline void twl4030_disconnect_pin(struct snd_soc_dapm_context *dapm, static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_card *card = codec->card; + struct snd_soc_card *card = rtd->card; struct snd_soc_dapm_context *dapm = &codec->dapm; struct omap_tw4030_pdata *pdata = dev_get_platdata(card->dev); struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card); diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index 866578bcda55..6951dc812055 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c @@ -286,7 +286,7 @@ static const struct snd_kcontrol_new aic34_rx51_controls[] = { static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) { struct snd_soc_codec *codec = rtd->codec; - struct snd_soc_card *card = codec->card; + struct snd_soc_card *card = rtd->card; struct rx51_audio_pdata *pdata = snd_soc_card_get_drvdata(card); struct snd_soc_dapm_context *dapm = &codec->dapm; -- cgit v1.2.3 From e1d4d3c854f25cff6c6c139588570e124d5e8fa4 Mon Sep 17 00:00:00 2001 From: Stephen Warren Date: Fri, 30 May 2014 12:42:57 -0600 Subject: ASoC: free jack GPIOs before the sound card is freed This is the same change as commit fb6b8e71448a "ASoC: tegra: free jack GPIOs before the sound card is freed", but applied to all other ASoC machine drivers where code inspection indicates the same problem exists. That commit's description is: ========== snd_soc_jack_add_gpios() schedules a work queue item to poll the GPIO to generate an initial jack status report. If sound card initialization fails, that work item needs to be cancelled, so it doesn't run after the card has been freed. Specifically, freeing the card calls snd_jack_dev_free() which calls snd_jack_dev_disconnect() which sets jack->input_dev = NULL, and input_dev is used by snd_jack_report(), which is called from the work queue item. snd_soc_jack_free_gpios() cancels the work item. The Tegra ASoC machine drivers do call this function in the platform driver remove() callback. However, this happens after the sound card is freed, at least when the card is freed due to errors late during snd_soc_instantiate_card(). This leaves a window where the work item can execute after the card is freed. In next-20140522, sound card initialization does fail for unrelated reasons, and hits the problem described above. To solve this, fix the Tegra ASoC machine drivers to clean up the Jack GPIOs during the snd_soc_card's .remove() callback, which is executed before the overall card object is freed. also, guard the cleanup call based on whether we actually setup up the GPIOs in the first place. Ideally, we'd do the cleanup in a struct snd_soc_dai_link .fini/remove function to match where the GPIOs get set up. However, there is no such callback. ========== Note that I have not even compile-tested this in most cases, since most of the drivers rely on specific mach-* support I don't have enabled, and don't support COMPILE_TEST. Testing by the relevant board maintainers would be useful. Signed-off-by: Stephen Warren Signed-off-by: Mark Brown --- sound/soc/omap/ams-delta.c | 14 ++++++++++---- sound/soc/omap/omap-twl4030.c | 28 ++++++++++++++-------------- sound/soc/omap/rx51.c | 18 +++++++++--------- sound/soc/pxa/hx4700.c | 9 ++++++++- sound/soc/samsung/h1940_uda1380.c | 11 +++++++++-- sound/soc/samsung/rx1950_uda1380.c | 12 ++++++++++-- sound/soc/samsung/smartq_wm8987.c | 11 +++++++++-- 7 files changed, 69 insertions(+), 34 deletions(-) (limited to 'sound/soc/omap/omap-twl4030.c') diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index bb243c663e6b..1f41951d8b7f 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c @@ -527,6 +527,15 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd) return 0; } +static int ams_delta_card_remove(struct snd_soc_pcm_runtime *rtd) +{ + 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", @@ -543,6 +552,7 @@ 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, @@ -579,10 +589,6 @@ static int ams_delta_remove(struct platform_device *pdev) dev_warn(&pdev->dev, "failed to unregister V253 line discipline\n"); - snd_soc_jack_free_gpios(&ams_delta_hook_switch, - ARRAY_SIZE(ams_delta_hook_switch_gpios), - ams_delta_hook_switch_gpios); - snd_soc_unregister_card(card); card->dev = NULL; return 0; diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c index 64141db311b2..b4e282871658 100644 --- a/sound/soc/omap/omap-twl4030.c +++ b/sound/soc/omap/omap-twl4030.c @@ -231,6 +231,19 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd) return ret; } +static int omap_twl4030_card_remove(struct snd_soc_pcm_runtime *rtd) +{ + struct snd_soc_card *card = rtd->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[] = { { @@ -258,6 +271,7 @@ 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), @@ -353,19 +367,6 @@ static int omap_twl4030_probe(struct platform_device *pdev) return 0; } -static int omap_twl4030_remove(struct platform_device *pdev) -{ - struct snd_soc_card *card = platform_get_drvdata(pdev); - 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; -} - static const struct of_device_id omap_twl4030_of_match[] = { {.compatible = "ti,omap-twl4030", }, { }, @@ -380,7 +381,6 @@ static struct platform_driver omap_twl4030_driver = { .of_match_table = omap_twl4030_of_match, }, .probe = omap_twl4030_probe, - .remove = omap_twl4030_remove, }; module_platform_driver(omap_twl4030_driver); diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index 6951dc812055..47a10290535b 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c @@ -334,6 +334,14 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) return err; } +static int rx51_card_remove(struct snd_soc_pcm_runtime *rtd) +{ + 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[] = { { @@ -368,6 +376,7 @@ 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, @@ -499,14 +508,6 @@ static int rx51_soc_probe(struct platform_device *pdev) return 0; } -static int rx51_soc_remove(struct platform_device *pdev) -{ - snd_soc_jack_free_gpios(&rx51_av_jack, ARRAY_SIZE(rx51_av_jack_gpios), - rx51_av_jack_gpios); - - return 0; -} - #if defined(CONFIG_OF) static const struct of_device_id rx51_audio_of_match[] = { { .compatible = "nokia,n900-audio", }, @@ -522,7 +523,6 @@ static struct platform_driver rx51_soc_driver = { .of_match_table = of_match_ptr(rx51_audio_of_match), }, .probe = rx51_soc_probe, - .remove = rx51_soc_remove, }; module_platform_driver(rx51_soc_driver); diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c index dcc9b04bd92c..6b81acaffddd 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c @@ -152,6 +152,13 @@ static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd) return err; } +static int hx4700_card_remove(struct snd_soc_pcm_runtime *rtd) +{ + 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", @@ -170,6 +177,7 @@ 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, @@ -206,7 +214,6 @@ static int hx4700_audio_probe(struct platform_device *pdev) static int hx4700_audio_remove(struct platform_device *pdev) { - snd_soc_jack_free_gpios(&hs_jack, 1, &hs_jack_gpio); snd_soc_unregister_card(&snd_soc_card_hx4700); gpio_set_value(GPIO92_HX4700_HP_DRIVER, 0); diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index 9f2fb69dbaae..720357f11a7f 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -189,6 +189,14 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd) return 0; } +static int h1940_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd) +{ + 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[] = { { @@ -206,6 +214,7 @@ 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), @@ -257,8 +266,6 @@ err_out: static void __exit h1940_exit(void) { platform_device_unregister(s3c24xx_snd_device); - snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios), - hp_jack_gpios); gpio_free(S3C_GPIO_END + 9); } diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index 5b3e504d3a32..192aa9fc102f 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c @@ -31,6 +31,7 @@ #include "s3c24xx-i2s.h" static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd); +static int rx1950_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd); 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); @@ -116,6 +117,7 @@ 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), @@ -234,6 +236,14 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd) return 0; } +static int rx1950_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd) +{ + 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; @@ -278,8 +288,6 @@ err_gpio: static void __exit rx1950_exit(void) { platform_device_unregister(s3c24xx_snd_device); - snd_soc_jack_free_gpios(&hp_jack, ARRAY_SIZE(hp_jack_gpios), - hp_jack_gpios); gpio_free(S3C2410_GPA(1)); } diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c index df55db5d3554..271a904277a1 100644 --- a/sound/soc/samsung/smartq_wm8987.c +++ b/sound/soc/samsung/smartq_wm8987.c @@ -182,6 +182,14 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd) return err; } +static int smartq_wm8987_card_remove(struct snd_soc_pcm_runtime *rtd) +{ + 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", @@ -198,6 +206,7 @@ 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), @@ -259,8 +268,6 @@ err_unregister_device: static void __exit smartq_exit(void) { gpio_free(S3C64XX_GPK(12)); - snd_soc_jack_free_gpios(&smartq_jack, ARRAY_SIZE(smartq_jack_gpios), - smartq_jack_gpios); platform_device_unregister(smartq_snd_device); } -- cgit v1.2.3 From 16088cb6c02d0b766b9b8d7edff98da7f1c93205 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 3 Jun 2014 12:31:46 +0200 Subject: ASoC: Fix wrong argument for card remove callbacks The commit [e1d4d3c8: ASoC: free jack GPIOs before the sound card is freed] introduced snd_soc_card remove callbacks to a few drivers, but they are implemented with a wrong argument type. The callback should receive snd_soc_card pointer instead of snd_soc_pcm_runtime. Fixes: e1d4d3c854f2 ('ASoC: free jack GPIOs before the sound card is freed') Acked-by: Mark Brown Signed-off-by: Takashi Iwai --- sound/soc/omap/ams-delta.c | 2 +- sound/soc/omap/omap-twl4030.c | 3 +-- sound/soc/omap/rx51.c | 2 +- sound/soc/pxa/hx4700.c | 2 +- sound/soc/samsung/h1940_uda1380.c | 2 +- sound/soc/samsung/rx1950_uda1380.c | 4 ++-- sound/soc/samsung/smartq_wm8987.c | 2 +- 7 files changed, 8 insertions(+), 9 deletions(-) (limited to 'sound/soc/omap/omap-twl4030.c') diff --git a/sound/soc/omap/ams-delta.c b/sound/soc/omap/ams-delta.c index 1f41951d8b7f..0cc41f94de4e 100644 --- a/sound/soc/omap/ams-delta.c +++ b/sound/soc/omap/ams-delta.c @@ -527,7 +527,7 @@ static int ams_delta_cx20442_init(struct snd_soc_pcm_runtime *rtd) return 0; } -static int ams_delta_card_remove(struct snd_soc_pcm_runtime *rtd) +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), diff --git a/sound/soc/omap/omap-twl4030.c b/sound/soc/omap/omap-twl4030.c index b4e282871658..f8a6adc2d81c 100644 --- a/sound/soc/omap/omap-twl4030.c +++ b/sound/soc/omap/omap-twl4030.c @@ -231,9 +231,8 @@ static int omap_twl4030_init(struct snd_soc_pcm_runtime *rtd) return ret; } -static int omap_twl4030_card_remove(struct snd_soc_pcm_runtime *rtd) +static int omap_twl4030_card_remove(struct snd_soc_card *card) { - struct snd_soc_card *card = rtd->card; struct omap_twl4030 *priv = snd_soc_card_get_drvdata(card); if (priv->jack_detect > 0) diff --git a/sound/soc/omap/rx51.c b/sound/soc/omap/rx51.c index 47a10290535b..943922c79f78 100644 --- a/sound/soc/omap/rx51.c +++ b/sound/soc/omap/rx51.c @@ -334,7 +334,7 @@ static int rx51_aic34_init(struct snd_soc_pcm_runtime *rtd) return err; } -static int rx51_card_remove(struct snd_soc_pcm_runtime *rtd) +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); diff --git a/sound/soc/pxa/hx4700.c b/sound/soc/pxa/hx4700.c index 6b81acaffddd..05559a725bec 100644 --- a/sound/soc/pxa/hx4700.c +++ b/sound/soc/pxa/hx4700.c @@ -152,7 +152,7 @@ static int hx4700_ak4641_init(struct snd_soc_pcm_runtime *rtd) return err; } -static int hx4700_card_remove(struct snd_soc_pcm_runtime *rtd) +static int hx4700_card_remove(struct snd_soc_card *card) { snd_soc_jack_free_gpios(&hs_jack, 1, &hs_jack_gpio); diff --git a/sound/soc/samsung/h1940_uda1380.c b/sound/soc/samsung/h1940_uda1380.c index 720357f11a7f..f2d7980d7ddc 100644 --- a/sound/soc/samsung/h1940_uda1380.c +++ b/sound/soc/samsung/h1940_uda1380.c @@ -189,7 +189,7 @@ static int h1940_uda1380_init(struct snd_soc_pcm_runtime *rtd) return 0; } -static int h1940_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd) +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); diff --git a/sound/soc/samsung/rx1950_uda1380.c b/sound/soc/samsung/rx1950_uda1380.c index 192aa9fc102f..37688ebbb2b4 100644 --- a/sound/soc/samsung/rx1950_uda1380.c +++ b/sound/soc/samsung/rx1950_uda1380.c @@ -31,7 +31,7 @@ #include "s3c24xx-i2s.h" static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd); -static int rx1950_uda1380_card_remove(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); @@ -236,7 +236,7 @@ static int rx1950_uda1380_init(struct snd_soc_pcm_runtime *rtd) return 0; } -static int rx1950_uda1380_card_remove(struct snd_soc_pcm_runtime *rtd) +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); diff --git a/sound/soc/samsung/smartq_wm8987.c b/sound/soc/samsung/smartq_wm8987.c index 271a904277a1..9b0ffacab790 100644 --- a/sound/soc/samsung/smartq_wm8987.c +++ b/sound/soc/samsung/smartq_wm8987.c @@ -182,7 +182,7 @@ static int smartq_wm8987_init(struct snd_soc_pcm_runtime *rtd) return err; } -static int smartq_wm8987_card_remove(struct snd_soc_pcm_runtime *rtd) +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); -- cgit v1.2.3