Skip to content

Commit

Permalink
ASoC: Fix wrong argument for card remove callbacks
Browse files Browse the repository at this point in the history
The commit [e1d4d3c: 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: e1d4d3c ('ASoC: free jack GPIOs before the sound card is freed')
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Jun 3, 2014
1 parent 8743dcd commit 16088cb
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion sound/soc/omap/ams-delta.c
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
3 changes: 1 addition & 2 deletions sound/soc/omap/omap-twl4030.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/omap/rx51.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/pxa/hx4700.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion sound/soc/samsung/h1940_uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions sound/soc/samsung/rx1950_uda1380.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion sound/soc/samsung/smartq_wm8987.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 16088cb

Please sign in to comment.