aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/davinci/davinci-sffsdr.c
diff options
context:
space:
mode:
authorKevin Hilman <khilman@deeprootsystems.com>2009-02-13 14:36:37 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2009-02-13 15:21:30 -0500
commitbf3dbe5c8c4b85f98c36d35432efa6573b75e6d3 (patch)
treeaabfddb8276b8ea3ab0653633716d8ad395870fe /sound/soc/davinci/davinci-sffsdr.c
parentf1464ede550b8fda75086cb9bacf8d60fc9f6780 (diff)
ASoC: Fix DaVinci module unload error
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, DM644x SFFSDR and DM355 EVM. Signed-off-by: Chaithrika U S <chaithrika@ti.com> Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/davinci/davinci-sffsdr.c')
-rw-r--r--sound/soc/davinci/davinci-sffsdr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/soc/davinci/davinci-sffsdr.c b/sound/soc/davinci/davinci-sffsdr.c
index 50baef1fe5b4..0bf81abba8c7 100644
--- a/sound/soc/davinci/davinci-sffsdr.c
+++ b/sound/soc/davinci/davinci-sffsdr.c
@@ -141,7 +141,8 @@ static int __init sffsdr_init(void)
141 141
142 platform_set_drvdata(sffsdr_snd_device, &sffsdr_snd_devdata); 142 platform_set_drvdata(sffsdr_snd_device, &sffsdr_snd_devdata);
143 sffsdr_snd_devdata.dev = &sffsdr_snd_device->dev; 143 sffsdr_snd_devdata.dev = &sffsdr_snd_device->dev;
144 sffsdr_snd_device->dev.platform_data = &sffsdr_snd_data; 144 platform_device_add_data(sffsdr_snd_device, &sffsdr_snd_data,
145 sizeof(sffsdr_snd_data));
145 146
146 ret = platform_device_add_resources(sffsdr_snd_device, 147 ret = platform_device_add_resources(sffsdr_snd_device,
147 sffsdr_snd_resources, 148 sffsdr_snd_resources,