From patchwork Wed Oct 2 02:56:59 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hui Wang X-Patchwork-Id: 832224 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1507CF318F for ; Wed, 2 Oct 2024 02:58:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0F9F2850; Wed, 2 Oct 2024 04:57:49 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0F9F2850 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1727837879; bh=cQxureHNPMD18RXuzOxmVrs25ScKxLAruO/HtRJl0eU=; h=From:To:Subject:Date:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=DYfebLb4Y5G8v54TFkQwBhCf5m6EksSZOrtBPfJUjSb+HnSyFkZ69xunDZp8nhEmO QzA7vW6MOVvlQpFlh6Pj0cwrFuwG1Dfb5VWY+4WF7jIIAzlLneRNLnl2pvgvI+d69U R0MAET9iO+FVGxV2hu5RUc+BEVmNEVhFwl7Z67k8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 467ADF805B2; Wed, 2 Oct 2024 04:57:28 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 99A37F805A8; Wed, 2 Oct 2024 04:57:27 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 85BE1F80517; Wed, 2 Oct 2024 04:57:18 +0200 (CEST) Received: from smtp-relay-canonical-0.canonical.com (smtp-relay-canonical-0.canonical.com [185.125.188.120]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 16058F80104 for ; Wed, 2 Oct 2024 04:57:15 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 16058F80104 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=uCKSq/w0 Received: from hwang4-ThinkPad-T14s-Gen-2a.. (unknown [120.85.104.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 996B33F0E1; Wed, 2 Oct 2024 02:57:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1727837835; bh=fOcbFN2psEtgjEpNtJy2uV3fiD1cmaNpijGxr2R8lmg=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=uCKSq/w02F0zh4E5rq36wkBEOLI2v4oCA18oRR49CK9LwnM85JaB8pgSgvot9XJoo b+fcRr1o6TmIkXITyoAl53f/y0TKGOAo3nvEyTAc1sMhccRP6svs6w27JHhd9XuSHs 9MOLjtNc3puFLMjvd9bEAgn+kkcOubKkuXMfVdOXWgsdGs6MjbTRZg6pNrYZnv7nq+ hDJ57air7patY0Hh1NXfdVnJ/hSlKZ+x0JJb2YtbCDMItvvF+zuIzEH2HcrmJs/VjI 33QAeenDKEeMIxPEC3e1hXd/Ysmu+Qu72UwXgujuBcBBHrfuAtbpYhsdbUNG8JbmcI YlkWPufUAMFRA== From: Hui Wang To: alsa-devel@alsa-project.org, broonie@kernel.org, shengjiu.wang@gmail.com, Xiubo.Lee@gmail.com, festevam@gmail.com, nicoleotsuka@gmail.com, lgirdwood@gmail.com Subject: [PATCH] ASoC: imx-card: Set card.owner to avoid a warning calltrace if SND=m Date: Wed, 2 Oct 2024 10:56:59 +0800 Message-Id: <20241002025659.723544-1-hui.wang@canonical.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Message-ID-Hash: EZMGKSPWGMNZDI7636TE477SFYGB5ESK X-Message-ID-Hash: EZMGKSPWGMNZDI7636TE477SFYGB5ESK X-MailFrom: hui.wang@canonical.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: In most Linux distribution kernels, the SND is set to m, in such a case, when booting the kernel on i.MX8MP EVK board, there is a warning calltrace like below: Call trace: snd_card_init+0x484/0x4cc [snd] snd_card_new+0x70/0xa8 [snd] snd_soc_bind_card+0x310/0xbd0 [snd_soc_core] snd_soc_register_card+0xf0/0x108 [snd_soc_core] devm_snd_soc_register_card+0x4c/0xa4 [snd_soc_core] That is because the card.owner is not set, a warning calltrace is raised in the snd_card_init() due to it. Fixes: aa736700f42f ("ASoC: imx-card: Add imx-card machine driver") Signed-off-by: Hui Wang --- sound/soc/fsl/imx-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/imx-card.c b/sound/soc/fsl/imx-card.c index 98b37dd2b901..a7215bad6484 100644 --- a/sound/soc/fsl/imx-card.c +++ b/sound/soc/fsl/imx-card.c @@ -710,6 +710,7 @@ static int imx_card_probe(struct platform_device *pdev) data->plat_data = plat_data; data->card.dev = &pdev->dev; + data->card.owner = THIS_MODULE; dev_set_drvdata(&pdev->dev, &data->card); snd_soc_card_set_drvdata(&data->card, data);