From mboxrd@z Thu Jan 1 00:00:00 1970 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=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 2C321C49EA2 for ; Tue, 15 Jun 2021 15:49:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0DA446162B for ; Tue, 15 Jun 2021 15:49:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231669AbhFOPvC (ORCPT ); Tue, 15 Jun 2021 11:51:02 -0400 Received: from mail.kernel.org ([198.145.29.99]:44678 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231853AbhFOPuj (ORCPT ); Tue, 15 Jun 2021 11:50:39 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id F12DD61626; Tue, 15 Jun 2021 15:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623772113; bh=NtMKHikNEMchJUzwx8CdjNO3tpRArTcGzKU5NJGU3j4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AVgxaFF3ACdw4oO8qEU3k9z23pilTzhVvIUSp3JBhcYEOfsClkYVgkwpmVFa373GL e1AgHHlHSqEm266dJFCg+ClnQcX9SJeXiFgxp6bzy6ViA2ryqDf3anVPqArJhGH++i pc3hbSTANRYcD7YDjuXNAADWj9PJeK2O2eLkz0AdHETxOO1maWVMV/Vu8/6Yh73kyP SI0gRSc3MAfrTJPVGL5XReLmAXN1gyRobYJza43lL3NDFTvZGNkJ3tXYMeVDtPqZpC XIPPcEQyRd7bGtJIPDjpAlNVGFom3vkcmBWPmxPnZ5UaN0XrphhedZl0g7xtWVROSi B7EVkVfh7EogQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Nicolas Cavallari , Shengjiu Wang , Mark Brown , Sasha Levin , alsa-devel@alsa-project.org, linuxppc-dev@lists.ozlabs.org Subject: [PATCH AUTOSEL 5.12 07/33] ASoC: fsl-asoc-card: Set .owner attribute when registering card. Date: Tue, 15 Jun 2021 11:47:58 -0400 Message-Id: <20210615154824.62044-7-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210615154824.62044-1-sashal@kernel.org> References: <20210615154824.62044-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nicolas Cavallari [ Upstream commit a8437f05384cb472518ec21bf4fffbe8f0a47378 ] 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 Link: https://lore.kernel.org/r/20210527163409.22049-1-nicolas.cavallari@green-communications.fr Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 f62f81ceab0d..9dcbe5d5a428 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -732,6 +732,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", -- 2.30.2 From mboxrd@z Thu Jan 1 00:00:00 1970 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=-17.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,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 E0230C49EA2 for ; Tue, 15 Jun 2021 15:49:57 +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 6D82F61864 for ; Tue, 15 Jun 2021 15:49:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6D82F61864 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org 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 0A8DF16B5; Tue, 15 Jun 2021 17:49:06 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0A8DF16B5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623772196; bh=NtMKHikNEMchJUzwx8CdjNO3tpRArTcGzKU5NJGU3j4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=gKDxXMIL2y7ZaZa6HrNKmMEo6QVpEnseh0uiW+EZAW8Hkg1/dWIke5Y7KIFd+POwR Ok7fnBK+l0mkFpITWNEAzJZOut87LaFPJmS1vKJ90Z9dxG0egbqFaS+hLjleEbZ68V P0qVBnz/vPeARGJ8O6H9d8VxS/2pVwJWe9UfC8IY= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id C6549F804E2; Tue, 15 Jun 2021 17:48:47 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id C36D8F804E3; Tue, 15 Jun 2021 17:48:46 +0200 (CEST) Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 4AC6FF8016C for ; Tue, 15 Jun 2021 17:48:35 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 4AC6FF8016C Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AVgxaFF3" Received: by mail.kernel.org (Postfix) with ESMTPSA id F12DD61626; Tue, 15 Jun 2021 15:48:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623772113; bh=NtMKHikNEMchJUzwx8CdjNO3tpRArTcGzKU5NJGU3j4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AVgxaFF3ACdw4oO8qEU3k9z23pilTzhVvIUSp3JBhcYEOfsClkYVgkwpmVFa373GL e1AgHHlHSqEm266dJFCg+ClnQcX9SJeXiFgxp6bzy6ViA2ryqDf3anVPqArJhGH++i pc3hbSTANRYcD7YDjuXNAADWj9PJeK2O2eLkz0AdHETxOO1maWVMV/Vu8/6Yh73kyP SI0gRSc3MAfrTJPVGL5XReLmAXN1gyRobYJza43lL3NDFTvZGNkJ3tXYMeVDtPqZpC XIPPcEQyRd7bGtJIPDjpAlNVGFom3vkcmBWPmxPnZ5UaN0XrphhedZl0g7xtWVROSi B7EVkVfh7EogQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: [PATCH AUTOSEL 5.12 07/33] ASoC: fsl-asoc-card: Set .owner attribute when registering card. Date: Tue, 15 Jun 2021 11:47:58 -0400 Message-Id: <20210615154824.62044-7-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210615154824.62044-1-sashal@kernel.org> References: <20210615154824.62044-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Cc: Sasha Levin , alsa-devel@alsa-project.org, Nicolas Cavallari , Shengjiu Wang , Mark Brown , linuxppc-dev@lists.ozlabs.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" From: Nicolas Cavallari [ Upstream commit a8437f05384cb472518ec21bf4fffbe8f0a47378 ] 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 Link: https://lore.kernel.org/r/20210527163409.22049-1-nicolas.cavallari@green-communications.fr Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- 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 f62f81ceab0d..9dcbe5d5a428 100644 --- a/sound/soc/fsl/fsl-asoc-card.c +++ b/sound/soc/fsl/fsl-asoc-card.c @@ -732,6 +732,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", -- 2.30.2