All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ASoC: sunxi: sun4i-codec: fill ASoC card owner
@ 2021-03-31 14:59 bage
  2021-03-31 15:06   ` Mark Brown
  2021-04-01 10:16   ` Mark Brown
  0 siblings, 2 replies; 8+ messages in thread
From: bage @ 2021-03-31 14:59 UTC (permalink / raw)
  To: Maxime Ripard, Mark Brown, Chen-Yu Tsai
  Cc: Bastian Germann, linux-arm-kernel, alsa-devel

From: Bastian Germann <bage@linutronix.de>

card->owner is a required property and since commit 81033c6b584b ("ALSA:
core: Warn on empty module") a warning is issued if it is empty. Add it.
This fixes following warning observed on Lamobo R1:

WARNING: CPU: 1 PID: 190 at sound/core/init.c:207 snd_card_new+0x430/0x480 [snd]
Modules linked in: sun4i_codec(E+) sun4i_backend(E+) snd_soc_core(E) ...
CPU: 1 PID: 190 Comm: systemd-udevd Tainted: G         C  E     5.10.0-1-armmp #1 Debian 5.10.4-1
Hardware name: Allwinner sun7i (A20) Family
[<c0ce8544>] (dump_backtrace) from [<c0ce88f0>] (show_stack+0x20/0x24)
[<c0ce88d0>] (show_stack) from [<c0ceda20>] (dump_stack+0xc8/0xdc)
[<c0ced958>] (dump_stack) from [<c034d49c>] (__warn+0xfc/0x158)
[<c034d3a0>] (__warn) from [<c0ce966c>] (warn_slowpath_fmt+0x70/0xe4)
[<c0ce9600>] (warn_slowpath_fmt) from [<bf48f604>] (snd_card_new+0x430/0x480 [snd])
[<bf48f1d4>] (snd_card_new [snd]) from [<bf53340c>] (snd_soc_bind_card+0x3a8/0xa30 [snd_soc_core])
[<bf533064>] (snd_soc_bind_card [snd_soc_core]) from [<bf533b8c>] (snd_soc_register_card+0xf8/0x108 [snd_soc_core])
[<bf533a94>] (snd_soc_register_card [snd_soc_core]) from [<bf55b888>] (sun4i_codec_probe+0x224/0x45c [sun4i_codec])
[<bf55b664>] (sun4i_codec_probe [sun4i_codec]) from [<c09879b4>] (platform_drv_probe+0x58/0xa8)
[<c098795c>] (platform_drv_probe) from [<c0984dc8>] (really_probe+0x108/0x510)
[<c0984cc0>] (really_probe) from [<c0985674>] (driver_probe_device+0x100/0x1d0)
[<c0985574>] (driver_probe_device) from [<c0985a74>] (device_driver_attach+0xb8/0xc0)
[<c09859bc>] (device_driver_attach) from [<c0985b18>] (__driver_attach+0x9c/0x150)
[<c0985a7c>] (__driver_attach) from [<c09825c8>] (bus_for_each_dev+0x84/0xd0)
[<c0982544>] (bus_for_each_dev) from [<c09844bc>] (driver_attach+0x2c/0x30)
[<c0984490>] (driver_attach) from [<c0983e70>] (bus_add_driver+0x120/0x20c)
[<c0983d50>] (bus_add_driver) from [<c098670c>] (driver_register+0x98/0x128)
[<c0986674>] (driver_register) from [<c0987908>] (__platform_driver_register+0x50/0x58)
[<c09878b8>] (__platform_driver_register) from [<bf566024>] (sun4i_codec_driver_init+0x24/0x1000 [sun4i_codec])
[<bf566000>] (sun4i_codec_driver_init [sun4i_codec]) from [<c030293c>] (do_one_initcall+0x50/0x274)
[<c03028ec>] (do_one_initcall) from [<c040d45c>] (do_init_module+0x70/0x294)
[<c040d3ec>] (do_init_module) from [<c040f9f4>] (load_module+0x2258/0x263c)
[<c040d79c>] (load_module) from [<c04100c0>] (sys_finit_module+0xc8/0x12c)
[<c040fff8>] (sys_finit_module) from [<c03002a4>] (__sys_trace_return+0x0/0x1c)

Fixes: 45fb6b6f2aa3 ("ASoC: sunxi: add support for the on-chip codec on early Allwinner SoCs")
Related: commit 3c27ea23ffb4 ("ASoC: qcom: Set card->owner to avoid warnings")
Related: commit ec653df2a0cb ("drm/vc4/vc4_hdmi: fill ASoC card owner")
Cc: linux-arm-kernel@lists.infradead.org
Cc: alsa-devel@alsa-project.org
Signed-off-by: Bastian Germann <bage@linutronix.de>
---
 sound/soc/sunxi/sun4i-codec.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/sunxi/sun4i-codec.c b/sound/soc/sunxi/sun4i-codec.c
index 6c13cc84b3fb..2173991c13db 100644
--- a/sound/soc/sunxi/sun4i-codec.c
+++ b/sound/soc/sunxi/sun4i-codec.c
@@ -1364,6 +1364,7 @@ static struct snd_soc_card *sun4i_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "sun4i-codec";
 	card->dapm_widgets	= sun4i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun4i_codec_card_dapm_widgets);
@@ -1396,6 +1397,7 @@ static struct snd_soc_card *sun6i_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "A31 Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);
@@ -1449,6 +1451,7 @@ static struct snd_soc_card *sun8i_a23_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "A23 Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);
@@ -1487,6 +1490,7 @@ static struct snd_soc_card *sun8i_h3_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "H3 Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);
@@ -1525,6 +1529,7 @@ static struct snd_soc_card *sun8i_v3s_codec_create_card(struct device *dev)
 		return ERR_PTR(-ENOMEM);
 
 	card->dev		= dev;
+	card->owner		= THIS_MODULE;
 	card->name		= "V3s Audio Codec";
 	card->dapm_widgets	= sun6i_codec_card_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(sun6i_codec_card_dapm_widgets);
-- 
2.30.2


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-04-01 10:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 14:59 [PATCH] ASoC: sunxi: sun4i-codec: fill ASoC card owner bage
2021-03-31 15:06 ` Mark Brown
2021-03-31 15:06   ` Mark Brown
2021-03-31 15:18   ` [PATCH v2] " bage
2021-04-01 10:16     ` Mark Brown
2021-04-01 10:16       ` Mark Brown
2021-04-01 10:16 ` [PATCH] " Mark Brown
2021-04-01 10:16   ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.