Skip to contentSkip to conversation

ASoC: MPC5200: replace of_device with platform_device

PATCH In review Timur Tabi 2 participants 8 messages Aug 23, 2011 – Aug 25, 2011

Subsystems (2)
lore
Share & tools
lore

Timur Tabi

author
#0 lore raw

PATCH 1/1 ASoC: MPC5200: replace of_device with platform_device

'struct of_device' no longer exists, and its functionality has been merged into platform_device. Update the MPC5200 audio DMA driver (mpc5200_dma) accordingly. This fixes a build break.

---
 sound/soc/fsl/mpc5200_dma.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
sound/soc/fsl/mpc5200_dma.c +3 -3
index fd0dc46..5c6c245 100644
@@ -369,7 +369,7 @@ static struct snd_soc_platform_driver mpc5200_audio_dma_platform = {
 	.pcm_free	= &psc_dma_free,
 };
 
-static int mpc5200_hpcd_probe(struct of_device *op)
+static int mpc5200_hpcd_probe(struct platform_device *op)
 {
 	phys_addr_t fifo;
 	struct psc_dma *psc_dma;
@@ -487,7 +487,7 @@ out_unmap:
 	return ret;
 }
 
-static int mpc5200_hpcd_remove(struct of_device *op)
+static int mpc5200_hpcd_remove(struct platform_device *op)
 {
 	struct psc_dma *psc_dma = dev_get_drvdata(&op->dev);
 
@@ -519,7 +519,7 @@ MODULE_DEVICE_TABLE(of, mpc5200_hpcd_match);
 static struct platform_driver mpc5200_hpcd_of_driver = {
 	.probe		= mpc5200_hpcd_probe,
 	.remove		= mpc5200_hpcd_remove,
-	.dev = {
+	.driver = {
 		.owner		= THIS_MODULE,
 		.name		= "mpc5200-pcm-audio",
 		.of_match_table    = mpc5200_hpcd_match,
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 3 lines · Timur Tabi

'struct of_device' no longer exists, and its functionality has been merged into platform_device. Update the MPC5200 audio DMA driver (mpc5200_dma) accordingly. This fixes a build break.

Which version does this build issue apply to - 3.1 or 3.2?

author
#2 lore raw
Quoted 6 lines · Mark Brown
Quoted 3 lines · Timur Tabi

'struct of_device' no longer exists, and its functionality has been merged into platform_device. Update the MPC5200 audio DMA driver (mpc5200_dma) accordingly. This fixes a build break.

Which version does this build issue apply to - 3.1 or 3.2?

Everything. It fixes a build break.

The defconfig for the MPC5200 does not enable audio, so by default the build won't break. It's up to you if you want to push this for 3.1.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#3 lore raw
Quoted 8 lines · Timur Tabi
Quoted 1 line · Mark Brown

Which version does this build issue apply to - 3.1 or 3.2?

Everything. It fixes a build break.

The defconfig for the MPC5200 does not enable audio, so by default the build won't break. It's up to you if you want to push this for 3.1.

I'll apply it for 3.1, I was asking because I didn't know if the API change happened in 3.1 or was only present 3.2. Thanks.

author
#4 lore raw
Quoted 2 lines · Mark Brown

I'll apply it for 3.1, I was asking because I didn't know if the API change happened in 3.1 or was only present 3.2. Thanks.

I think the change happened in 3.0, or maybe even earlier.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#5 lore raw
Quoted 5 lines · Timur Tabi
Quoted 2 lines · Mark Brown

I'll apply it for 3.1, I was asking because I didn't know if the API change happened in 3.1 or was only present 3.2. Thanks.

I think the change happened in 3.0, or maybe even earlier.

Oh dear. Can you check please, if it did there should be a CC stable?

author
#6 lore raw
Quoted 8 lines · Mark Brown
Quoted 5 lines · Timur Tabi
Quoted 2 lines · Mark Brown

I'll apply it for 3.1, I was asking because I didn't know if the API change happened in 3.1 or was only present 3.2. Thanks.

I think the change happened in 3.0, or maybe even earlier.

Oh dear. Can you check please, if it did there should be a CC stable?

Apparently it was broken from the start, as git-bisect blames this commit:

f0fba2ad1b6b53d5360125c41953b7afcd6deff0 is the first bad commit commit f0fba2ad1b6b53d5360125c41953b7afcd6deff0

Author: Liam Girdwood <[email protected]>
Date:   Wed Mar 17 20:15:21 2010 +0000

ASoC: multi-component - ASoC Multi-Component Support

I suspect the problem is that the defconfig for the MPC5200 doesn't actually enable audio, so when that platform was tested, none of the ASoC code was actually compiled.

Signature · 2 lines
Timur Tabi
Linux kernel developer at Freescale
#7 lore raw
Quoted 3 lines · Timur Tabi

I suspect the problem is that the defconfig for the MPC5200 doesn't actually enable audio, so when that platform was tested, none of the ASoC code was actually compiled.

OK, thanks for checking and fixing. Like I said on IRC I applied the patch with a CC to stable.