Skip to content

Commit 3c27ea2

Browse files
stephan-ghbroonie
authored andcommitted
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 81033c6 ("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 <[email protected]> Fixes: 79119c7 ("ASoC: qcom: Add Storm machine driver") Fixes: bdb052e ("ASoC: qcom: add apq8016 sound card support") Fixes: a6f933f ("ASoC: qcom: apq8096: Add db820c machine driver") Fixes: 6b1687b ("ASoC: qcom: add sdm845 sound card support") Signed-off-by: Stephan Gerhold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 5e7820e commit 3c27ea2

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

sound/soc/qcom/apq8016_sbc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ static int apq8016_sbc_platform_probe(struct platform_device *pdev)
143143

144144
card = &data->card;
145145
card->dev = dev;
146+
card->owner = THIS_MODULE;
146147
card->dapm_widgets = apq8016_sbc_dapm_widgets;
147148
card->num_dapm_widgets = ARRAY_SIZE(apq8016_sbc_dapm_widgets);
148149

sound/soc/qcom/apq8096.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ static int apq8096_platform_probe(struct platform_device *pdev)
114114
return -ENOMEM;
115115

116116
card->dev = dev;
117+
card->owner = THIS_MODULE;
117118
dev_set_drvdata(dev, card);
118119
ret = qcom_snd_parse_of(card);
119120
if (ret)

sound/soc/qcom/sdm845.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -555,6 +555,7 @@ static int sdm845_snd_platform_probe(struct platform_device *pdev)
555555
card->dapm_widgets = sdm845_snd_widgets;
556556
card->num_dapm_widgets = ARRAY_SIZE(sdm845_snd_widgets);
557557
card->dev = dev;
558+
card->owner = THIS_MODULE;
558559
dev_set_drvdata(dev, card);
559560
ret = qcom_snd_parse_of(card);
560561
if (ret)

sound/soc/qcom/storm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ static int storm_platform_probe(struct platform_device *pdev)
9696
return -ENOMEM;
9797

9898
card->dev = &pdev->dev;
99+
card->owner = THIS_MODULE;
99100

100101
ret = snd_soc_of_parse_card_name(card, "qcom,model");
101102
if (ret) {

0 commit comments

Comments
 (0)