Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH]: ARM DaVinci ASoC: Fix module unload error
@ 2009-02-13  7:09 chaithrika
  2009-02-13 13:30 ` Mark Brown
  2009-02-13 17:47 ` Hugo Villeneuve
  0 siblings, 2 replies; 7+ messages in thread
From: chaithrika @ 2009-02-13  7:09 UTC (permalink / raw)
  To: alsa-devel; +Cc: Chaithrika U S, davinci-linux-open-source

From: Chaithrika U S <chaithrika@ti.com>

Fix for the error when the audio module is unloaded.
On unregistering the platform_device, platform_device_release will free the 
platform data.If platform data is static the kernel panics when it is freed.
Instead use the platform device helper function to add data.

This change has been tested on DM644x EVM.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
---
 sound/soc/davinci/davinci-evm.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/davinci/davinci-evm.c b/sound/soc/davinci/davinci-evm.c
index 1aad262..95c44bf 100644
--- a/sound/soc/davinci/davinci-evm.c
+++ b/sound/soc/davinci/davinci-evm.c
@@ -225,7 +225,7 @@ static int __init evm_init(void)
 
 	platform_set_drvdata(evm_snd_device, &evm_snd_devdata);
 	evm_snd_devdata.dev = &evm_snd_device->dev;
-	evm_snd_device->dev.platform_data = data;
+	platform_device_add_data(evm_snd_device, data, sizeof(data));
 
 	ret = platform_device_add_resources(evm_snd_device, resources, 1);
 	if (ret) {
-- 
1.5.6

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

end of thread, other threads:[~2009-02-13 22:37 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-13  7:09 [PATCH]: ARM DaVinci ASoC: Fix module unload error chaithrika
2009-02-13 13:30 ` Mark Brown
2009-02-13 19:36   ` Kevin Hilman
2009-02-13 20:31     ` Mark Brown
2009-02-13 22:37       ` Kevin Hilman
2009-02-13 17:47 ` Hugo Villeneuve
2009-02-13 19:16   ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox