From patchwork Wed Jun 6 08:55:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rohit Kumar X-Patchwork-Id: 10449861 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED37B60467 for ; Wed, 6 Jun 2018 08:55:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE3FD297F4 for ; Wed, 6 Jun 2018 08:55:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2BF529878; Wed, 6 Jun 2018 08:55:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2FDF6297F4 for ; Wed, 6 Jun 2018 08:55:55 +0000 (UTC) Received: from alsa0.perex.cz (localhost [127.0.0.1]) by alsa0.perex.cz (Postfix) with ESMTP id 2580F266D4C; Wed, 6 Jun 2018 10:55:54 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 15C4A266F88; Wed, 6 Jun 2018 10:55:51 +0200 (CEST) Received: from smtp.codeaurora.org (smtp.codeaurora.org [198.145.29.96]) by alsa0.perex.cz (Postfix) with ESMTP id 90DA7266D04 for ; Wed, 6 Jun 2018 10:55:48 +0200 (CEST) Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 12628607C7; Wed, 6 Jun 2018 08:55:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528275347; bh=/bQZsUObbEzeCXnJvpT/bSgrvvaK6gy0f9iCXeKABoY=; h=From:To:Cc:Subject:Date:From; b=VmfkTfkWnk6f/JNybb2PCC1Q6b9IK01swDvXrVzxw7FSipeFm0SpV3w3d68ftHTOC 3cxAbSkO3One9rpF5EsDPNCKOnmFFrYyvVq1PCz8oMl9q6sDxAK4dtXN/3q4NsEeTs sq7fVvfxZ3OiVDsJ5WyzpcZtcTD2iuoCPG9C887k= Received: from rohkumar-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: rohitkr@codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 5F7B0601D2; Wed, 6 Jun 2018 08:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1528275346; bh=/bQZsUObbEzeCXnJvpT/bSgrvvaK6gy0f9iCXeKABoY=; h=From:To:Cc:Subject:Date:From; b=LOcXF0nEukz0LXgl0wzaBiWmNKw1n8RzNxgKELq52e/OVuDiMsDOexAEYU0FFwxv6 Jj1ZdRePvhEqIhX11IAoSdJJpjQB6du460c2z74pUG3WHcRLEln4aOxzMmhxygx8T4 2pg36ARiOu6vkNNVpXesJDH/YF8eLSzXG//PXVZE= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 5F7B0601D2 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=rohitkr@codeaurora.org From: Rohit kumar To: plai@codeaurora.org, bgoswami@codeaurora.org, srinivas.kandagatla@linaro.org, rohkumar@qti.qualcomm.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Date: Wed, 6 Jun 2018 14:25:24 +0530 Message-Id: <1528275324-4878-1-git-send-email-rohitkr@codeaurora.org> X-Mailer: git-send-email 1.9.1 Cc: Rohit kumar Subject: [alsa-devel] [PATCH] ASoC: qcom: apq8096: set card as device drvdata X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP snd_soc_card is retrieved as device drvdata during unbind(). Set it as drvdata during bind() to avoid memory corruption during unbind(). Signed-off-by: Rohit kumar Acked-by: Srinivas Kandagatla --- sound/soc/qcom/apq8096.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/qcom/apq8096.c b/sound/soc/qcom/apq8096.c index 561cd42..239b8cb 100644 --- a/sound/soc/qcom/apq8096.c +++ b/sound/soc/qcom/apq8096.c @@ -140,6 +140,7 @@ static int apq8096_bind(struct device *dev) component_bind_all(dev, card); card->dev = dev; + dev_set_drvdata(dev, card); ret = apq8096_sbc_parse_of(card); if (ret) { dev_err(dev, "Error parsing OF data\n");