From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre-Louis Bossart Subject: Re: [alsa-devel] [PATCH -next v2] ASoC: Intel: bytcht_es8316: use correct drvdata in snd_byt_cht_es8316_mc_remove() Date: Wed, 9 Jan 2019 20:50:55 -0600 Message-ID: References: <1547023011-8321-1-git-send-email-weiyongjun1@huawei.com> <1547084589-40006-1-git-send-email-weiyongjun1@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1547084589-40006-1-git-send-email-weiyongjun1@huawei.com> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org To: Wei Yongjun , Liam Girdwood , Jie Yang , Mark Brown , Hans de Goede , Andy Shevchenko , Vinod Koul , Dan Carpenter Cc: kernel-janitors@vger.kernel.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org List-Id: alsa-devel@alsa-project.org On 1/9/19 7:43 PM, Wei Yongjun wrote: > 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: 0d3e91da0750 ("ASoC: Intel: bytcht_es8316: Add external speaker mux support") > Signed-off-by: Wei Yongjun Acked-by: Pierre-Louis Bossart > --- > v1 -> v2: fix snd_byt_cht_es8316_mc_remove() instead, suggested by Dan. > --- > sound/soc/intel/boards/bytcht_es8316.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c > index cdf2061..fa9c4cf 100644 > --- a/sound/soc/intel/boards/bytcht_es8316.c > +++ b/sound/soc/intel/boards/bytcht_es8316.c > @@ -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; > > > > _______________________________________________ > Alsa-devel mailing list > Alsa-devel@alsa-project.org > http://mailman.alsa-project.org/mailman/listinfo/alsa-devel