From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Carpenter Subject: Re: [PATCH -next] ASoC: Intel: bytcht_es8316: Set correct platform drvdata in snd_byt_cht_es8316_mc_probe() Date: Wed, 9 Jan 2019 12:29:24 +0300 Message-ID: <20190109092924.GB1743@kadam> References: <1547023011-8321-1-git-send-email-weiyongjun1@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from userp2120.oracle.com (userp2120.oracle.com [156.151.31.85]) by alsa0.perex.cz (Postfix) with ESMTP id 7F40F2665E5 for ; Wed, 9 Jan 2019 10:29:52 +0100 (CET) Content-Disposition: inline In-Reply-To: <1547023011-8321-1-git-send-email-weiyongjun1@huawei.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Wei Yongjun Cc: alsa-devel@alsa-project.org, Andy Shevchenko , kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org, Jie Yang , Takashi Iwai , Pierre-Louis Bossart , Liam Girdwood , Hans de Goede , Vinod Koul , Mark Brown List-Id: alsa-devel@alsa-project.org I think the correct fix is actually this (untested): diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index cdf2061e7613..fa9c4cf97686 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;