From patchwork Thu May 27 16:34:09 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Cavallari X-Patchwork-Id: 449525 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CE241C2B9F7 for ; Fri, 28 May 2021 14:16:52 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 287A8610A6 for ; Fri, 28 May 2021 14:16:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 287A8610A6 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=green-communications.fr Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BD94216D0; Fri, 28 May 2021 16:16:00 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BD94216D0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1622211410; bh=ccirT3gfVkmi1HXQ2sLn0J6QwVjyXbjrtw2sELpz75Q=; h=From:To:Subject:Date:Cc:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From; b=W4+11vhNRaZW6EJs5E/dRnId8tEWBAkUS80r39CVpiKZZjbf0a0rkUmncMqCVlltu wAfGngOZmZrIZhZOthmGeDQw8EmGZM9/iaKT/ECE6J7HvY1jJ3uq5/9ZX3lnIkEpw5 mG9ls1vFJ5NqqUtGdyv3vqViEp6wQskM2OcXSJ04= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 57F17F804BD; Fri, 28 May 2021 16:14:30 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id CEEA6F80149; Thu, 27 May 2021 18:35:21 +0200 (CEST) Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id BBC5AF8012E for ; Thu, 27 May 2021 18:35:14 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz BBC5AF8012E Received: from evilbit.green-communications.fr ([92.154.77.116]) by mrelayeu.kundenserver.de (mreue109 [213.165.67.119]) with ESMTPSA (Nemesis) id 1MxDgs-1lWi1Y41ay-00xb4U; Thu, 27 May 2021 18:35:05 +0200 From: Nicolas Cavallari To: Timur Tabi , Nicolin Chen , Xiubo Li , Fabio Estevam , Shengjiu Wang , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai Subject: [PATCH] ASoC: fsl-asoc-card: Set .owner attribute when registering card. Date: Thu, 27 May 2021 18:34:09 +0200 Message-Id: <20210527163409.22049-1-nicolas.cavallari@green-communications.fr> X-Mailer: git-send-email 2.32.0.rc0 MIME-Version: 1.0 X-Provags-ID: V03:K1:2Xcz2Picz7QfmT/3RZBi3M8YNs4IfW4bK0TwJV+1zVrQF9+vlSl SpyEYVbT+4phkVcPD0ZG9bn4CAhEsIknv5lWwzPzDyXjwUVbUyGnIcI/zSyao3qv97Uyo4i 8I+4g8168s60kXemjwIW7S501zxCz+aUwNwwO7y+Pb2ZprPbNdy7M8pHZeG2EZATaEWW/9y 6O8qBSxcDQtKbzu8xhHQw== X-UI-Out-Filterresults: notjunk:1; V03:K0:bzReOWb16ek=:V0+42pMgaYxIojg4mvWBbg pEcUglREpACdHscuIlYtm7rEF3ODNcM1E0WQzBzhTFSs7DhVRluMSngL55mjhF42QxYVfR6yN Y65WkxbZGGMseBbZaK3721OpVPaZT3j2d3whJBH8Ep+YS3iBF2L2spCuH5Auajt641GTL42GW kZof8yQyY9aoOgnyJac80gSxutgWZfgb4Ak7fxwPfzQESJbWM+oeXTICXrW5GCrCKvCz3bhat 2o9CPY6I3ZwHe5auyuKNq9RcQ7TdfEFm5KMHsn8mAXeUdPiGv68RVfSTL1M6WJG/6oHGiYyQR HaZkmeFqcTTe7HE2p0nVlYu5a/pBdX/bhesH0c8R/h8aIokRObk+EJDP8PICJNXBQOjZtpZXJ YjmDi/YZ3cxgRpEEEJOP/vNHx5P6984xxPB7G6loLa7hFlOWvrT7mggU/pHi2T2HMSGaaZ9LX I5+TKzR4hj5c+LinK2iGQJA6VuoWGUcp2B9Xhhb5O2b1stq40h5gqLrsyKkryYU2ZogkQFvtD kkykOYd/i9PhIrXzooyIfBz6g9K+osu7eGuFTYF6CFTnYg9QWm7CUZ6cn3PK6CoMw== X-Mailman-Approved-At: Fri, 28 May 2021 16:14:26 +0200 Cc: alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 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: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" Otherwise, when compiled as module, a WARN_ON is triggered: WARNING: CPU: 0 PID: 5 at sound/core/init.c:208 snd_card_new+0x310/0x39c [snd] [...] CPU: 0 PID: 5 Comm: kworker/0:0 Not tainted 5.10.39 #1 Hardware name: Freescale i.MX6 Quad/DualLite (Device Tree) Workqueue: events deferred_probe_work_func [] (unwind_backtrace) from [] (show_stack+0x10/0x14) [] (show_stack) from [] (dump_stack+0xdc/0x104) [] (dump_stack) from [] (__warn+0xd8/0x114) [] (__warn) from [] (warn_slowpath_fmt+0x5c/0xc4) [] (warn_slowpath_fmt) from [] (snd_card_new+0x310/0x39c [snd]) [] (snd_card_new [snd]) from [] (snd_soc_bind_card+0x334/0x9c4 [snd_soc_core]) [] (snd_soc_bind_card [snd_soc_core]) from [] (devm_snd_soc_register_card+0x30/0x6c [snd_soc_core]) [] (devm_snd_soc_register_card [snd_soc_core]) from [] (fsl_asoc_card_probe+0x550/0xcc8 [snd_soc_fsl_asoc_card]) [] (fsl_asoc_card_probe [snd_soc_fsl_asoc_card]) from [] (platform_drv_probe+0x48/0x98) [...] Signed-off-by: Nicolas Cavallari Acked-by: Shengjiu Wang --- sound/soc/fsl/fsl-asoc-card.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/fsl/fsl-asoc-card.c b/sound/soc/fsl/fsl-asoc-card.c index c62bfd1c3ac7..4f55b316cf0f 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -744,6 +744,7 @@ static int fsl_asoc_card_probe(struct platform_device *pdev) /* Initialize sound card */ priv->pdev = pdev; priv->card.dev = &pdev->dev; + priv->card.owner = THIS_MODULE; ret = snd_soc_of_parse_card_name(&priv->card, "model"); if (ret) { snprintf(priv->name, sizeof(priv->name), "%s-audio",