From patchwork Wed Jan 14 18:39:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 5634341 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AC8AAC058D for ; Wed, 14 Jan 2015 18:40:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E3A4A2018E for ; Wed, 14 Jan 2015 18:40:03 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7B0FD20160 for ; Wed, 14 Jan 2015 18:40:02 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 2EF91261AF0; Wed, 14 Jan 2015 19:40:01 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 43BD026154B; Wed, 14 Jan 2015 19:39:50 +0100 (CET) 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 31D532617AD; Wed, 14 Jan 2015 19:39:48 +0100 (CET) Received: from mail-qa0-f50.google.com (mail-qa0-f50.google.com [209.85.216.50]) by alsa0.perex.cz (Postfix) with ESMTP id 37D17261521 for ; Wed, 14 Jan 2015 19:39:41 +0100 (CET) Received: by mail-qa0-f50.google.com with SMTP id k15so7916001qaq.9 for ; Wed, 14 Jan 2015 10:39:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=aQ+INKArELbWWY8WzSo8/tyV4zQh4b5aMIIpz1JqSVs=; b=QM7Pw49VWSdjmlT5lVsXpr0QgjmEdPm9u91xmU+MLq6sEPtSvjg2YEPfnFBg5LxiUz 4G8OoT/B7hbMZRGVo7BqvniMT39yhNgzRQb3+Toqa/xMOTtRcr2YH2/1tF7UMgqafXFJ lxFGDNbeSGRT/2tRPUpEgfCpTJYfAseFfY78muvXXXe2c9dF0FwJ0PFPmoGV3YXU+GRJ VdxuXe+544x9yuGEV1Vbt9SDwMeX270uqzVLq7rsYUSWy93NS7xOaxuNndK9Ghl04ExA LRutsqdI2CR8rxWnIOQ4ecALn9ybMqzmHnH8oDsitIsjYSJ3B9lCI609hUnygZVvFbwq hpAQ== X-Received: by 10.229.79.69 with SMTP id o5mr6707743qck.13.1421260780011; Wed, 14 Jan 2015 10:39:40 -0800 (PST) Received: from localhost.localdomain ([201.82.153.107]) by mx.google.com with ESMTPSA id t12sm3644050qam.48.2015.01.14.10.39.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 14 Jan 2015 10:39:39 -0800 (PST) From: Fabio Estevam To: broonie@kernel.org Date: Wed, 14 Jan 2015 16:39:15 -0200 Message-Id: <1421260755-7445-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.9.1 Cc: nicoleotsuka@gmail.com, Fabio Estevam , alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH] ASoC: fsl: imx-spdif: Set the card owner field 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 From: Fabio Estevam Set the card owner field to avoid getting a kernel crash when the imx-spdif is unloaded while the playback is active. Signed-off-by: Fabio Estevam --- Build-tested only. sound/soc/fsl/imx-spdif.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/imx-spdif.c b/sound/soc/fsl/imx-spdif.c index e94704f..33da26a 100644 --- a/sound/soc/fsl/imx-spdif.c +++ b/sound/soc/fsl/imx-spdif.c @@ -60,6 +60,7 @@ static int imx_spdif_audio_probe(struct platform_device *pdev) data->card.dev = &pdev->dev; data->card.dai_link = &data->dai; data->card.num_links = 1; + data->card.owner = THIS_MODULE; ret = snd_soc_of_parse_card_name(&data->card, "model"); if (ret)