Skip to content

Commit

Permalink
ASoC: Intel: bytcht_es8316: use correct drvdata in snd_byt_cht_es8316…
Browse files Browse the repository at this point in the history
…_mc_remove()

The snd_byt_cht_es8316_mc_remove() use the platform drvdata as a type
of 'struct byt_cht_es8316_private', but snd_byt_cht_es8316_mc_probe()
set it to 'struct snd_soc_card', as suggested by Dan Carpenter, fix
the usage in snd_byt_cht_es8316_mc_remove().

Fixes: 0d3e91d ("ASoC: Intel: bytcht_es8316: Add external speaker mux support")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Wei Yongjun authored and broonie committed Jan 10, 2019
1 parent 04d979d commit f833fe2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sound/soc/intel/boards/bytcht_es8316.c
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,8 @@ static int snd_byt_cht_es8316_mc_probe(struct platform_device *pdev)

static int snd_byt_cht_es8316_mc_remove(struct platform_device *pdev)
{
struct byt_cht_es8316_private *priv = platform_get_drvdata(pdev);
struct snd_soc_card *card = platform_get_drvdata(pdev);
struct byt_cht_es8316_private *priv = snd_soc_card_get_drvdata(card);

gpiod_put(priv->speaker_en_gpio);
return 0;
Expand Down

0 comments on commit f833fe2

Please sign in to comment.