Commit 3c27ea23 authored by Stephan Gerhold's avatar Stephan Gerhold Committed by Mark Brown

ASoC: qcom: Set card->owner to avoid warnings

On Linux 5.9-rc1 I get the following warning with apq8016-sbc:

WARNING: CPU: 2 PID: 69 at sound/core/init.c:207 snd_card_new+0x36c/0x3b0 [snd]
CPU: 2 PID: 69 Comm: kworker/2:1 Not tainted 5.9.0-rc1 #1
Workqueue: events deferred_probe_work_func
pc : snd_card_new+0x36c/0x3b0 [snd]
lr : snd_card_new+0xf4/0x3b0 [snd]
Call trace:
 snd_card_new+0x36c/0x3b0 [snd]
 snd_soc_bind_card+0x340/0x9a0 [snd_soc_core]
 snd_soc_register_card+0xf4/0x110 [snd_soc_core]
 devm_snd_soc_register_card+0x44/0xa0 [snd_soc_core]
 apq8016_sbc_platform_probe+0x11c/0x140 [snd_soc_apq8016_sbc]

This warning was introduced in
commit 81033c6b ("ALSA: core: Warn on empty module").
It looks like we are supposed to set card->owner to THIS_MODULE.

Fix this for all the qcom ASoC drivers.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Fixes: 79119c79 ("ASoC: qcom: Add Storm machine driver")
Fixes: bdb052e8 ("ASoC: qcom: add apq8016 sound card support")
Fixes: a6f933f6 ("ASoC: qcom: apq8096: Add db820c machine driver")
Fixes: 6b1687bf ("ASoC: qcom: add sdm845 sound card support")
Signed-off-by: default avatarStephan Gerhold <stephan@gerhold.net>
Link: https://lore.kernel.org/r/20200820154511.203072-1-stephan@gerhold.netSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 5e7820e3
...@@ -143,6 +143,7 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev) ...@@ -143,6 +143,7 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev)
card = &data->card; card = &data->card;
card->dev = dev; card->dev = dev;
card->owner = THIS_MODULE;
card->dapm_widgets = apq8016_sbc_dapm_widgets; card->dapm_widgets = apq8016_sbc_dapm_widgets;
card->num_dapm_widgets = ARRAY_SIZE(apq8016_sbc_dapm_widgets); card->num_dapm_widgets = ARRAY_SIZE(apq8016_sbc_dapm_widgets);
......
...@@ -114,6 +114,7 @@ static int apq8096_platform_probe(struct platform_device *pdev) ...@@ -114,6 +114,7 @@ static int apq8096_platform_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
card->dev = dev; card->dev = dev;
card->owner = THIS_MODULE;
dev_set_drvdata(dev, card); dev_set_drvdata(dev, card);
ret = qcom_snd_parse_of(card); ret = qcom_snd_parse_of(card);
if (ret) if (ret)
......
...@@ -555,6 +555,7 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev) ...@@ -555,6 +555,7 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev)
card->dapm_widgets = sdm845_snd_widgets; card->dapm_widgets = sdm845_snd_widgets;
card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets); card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets);
card->dev = dev; card->dev = dev;
card->owner = THIS_MODULE;
dev_set_drvdata(dev, card); dev_set_drvdata(dev, card);
ret = qcom_snd_parse_of(card); ret = qcom_snd_parse_of(card);
if (ret) if (ret)
......
...@@ -96,6 +96,7 @@ static int storm_platform_probe(struct platform_device *pdev) ...@@ -96,6 +96,7 @@ static int storm_platform_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
card->dev = &pdev->dev; card->dev = &pdev->dev;
card->owner = THIS_MODULE;
ret = snd_soc_of_parse_card_name(card, "qcom,model"); ret = snd_soc_of_parse_card_name(card, "qcom,model");
if (ret) { if (ret) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment