Skip to contentSkip to conversation

ASoC: qcom: apq8096: set card as device drvdata

PATCH In review Rohit kumar 3 participants 3 messages Jun 6, 2018 – Jun 18, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: qcom: apq8096: set card as device drvdata

snd_soc_card is retrieved as device drvdata during unbind(). Set it as drvdata during bind() to avoid memory corruption during unbind().

---
 sound/soc/qcom/apq8096.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/qcom/apq8096.c +1 -0
index 561cd42..239b8cb 100644
@@ -140,6 +140,7 @@ static int apq8096_bind(struct device *dev)
 
 	component_bind_all(dev, card);
 	card->dev = dev;
+	dev_set_drvdata(dev, card);
 	ret = apq8096_sbc_parse_of(card);
 	if (ret) {
 		dev_err(dev, "Error parsing OF data\n");
Signature · 2 lines
Qualcomm India Private Limited, on behalf of Qualcomm Innovation Center, Inc.,
is a member of Code Aurora Forum, a Linux Foundation Collaborative Project.
Acked-by on v1 1/1
#1 lore raw
Quoted 5 lines · Rohit kumar

snd_soc_card is retrieved as device drvdata during unbind(). Set it as drvdata during bind() to avoid memory corruption during unbind().

Thanks for the patch,

Quoted 17 lines
---
  sound/soc/qcom/apq8096.c | 1 +
  1 file changed, 1 insertion(+)
sound/soc/qcom/apq8096.c +1 -0
index 561cd42..239b8cb 100644
@@ -140,6 +140,7 @@ static int apq8096_bind(struct device *dev)
 
  	component_bind_all(dev, card);
  	card->dev = dev;
+	dev_set_drvdata(dev, card);
  	ret = apq8096_sbc_parse_of(card);
  	if (ret) {
  		dev_err(dev, "Error parsing OF data\n");
maintainer
#2 lore raw

Applied "ASoC: qcom: apq8096: set card as device drvdata" to the asoc tree

In reply to Rohit kumar

The patch

ASoC: qcom: apq8096: set card as device drvdata

has been applied to the asoc tree at

https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

Thanks,
Mark

Quoted 1 line

From d5c4e972d512ae0b59108ca92b9b35bc5cf5c14e Mon Sep 17 00:00:00 2001

From: Rohit Kumar <[email protected]>
Date: Wed, 6 Jun 2018 14:25:24 +0530
Subject: [PATCH] ASoC: qcom: apq8096: set card as device drvdata

snd_soc_card is retrieved as device drvdata during unbind(). Set it as drvdata during bind() to avoid memory corruption during unbind().

---
 sound/soc/qcom/apq8096.c | 1 +
 1 file changed, 1 insertion(+)
sound/soc/qcom/apq8096.c +1 -0
index 561cd429e6f2..239b8cb77bdb 100644
@@ -140,6 +140,7 @@ static int apq8096_bind(struct device *dev)
 
 	component_bind_all(dev, card);
 	card->dev = dev;
+	dev_set_drvdata(dev, card);
 	ret = apq8096_sbc_parse_of(card);
 	if (ret) {
 		dev_err(dev, "Error parsing OF data\n");
Signature · 1 line
2.17.1