From: Hugo Villeneuve <hugo@hugovil.com>
To: chaithrika@ti.com
Cc: alsa-devel@alsa-project.org,
davinci-linux-open-source@linux.davincidsp.com
Subject: Re: [PATCH]: ARM DaVinci ASoC: Fix module unload error
Date: Fri, 13 Feb 2009 12:47:09 -0500 [thread overview]
Message-ID: <20090213124709.110f408d.hugo@hugovil.com> (raw)
In-Reply-To: <1234508979-13522-1-git-send-email-chaithrika@ti.com>
On Fri, 13 Feb 2009 12:39:39 +0530
chaithrika@ti.com wrote:
> 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));
Hi,
I modified your patch for the SFFSDR board and it also fixed the
problem. Thank-you.
Can you include the fix for the SFFSDR also in your patch? Here is the
modification for the SFFSDR:
diff --git a/sound/soc/davinci/davinci-sffsdr.c
b/sound/soc/davinci/davinci-sffsdr.c index a304ada..6e46258 100644
--- a/sound/soc/davinci/davinci-sffsdr.c
+++ b/sound/soc/davinci/davinci-sffsdr.c
@@ -128,7 +128,7 @@ static int __init sffsdr_init(void)
platform_set_drvdata(sffsdr_snd_device, &sffsdr_snd_devdata);
sffsdr_snd_devdata.dev = &sffsdr_snd_device->dev;
- sffsdr_snd_device->dev.platform_data = &sffsdr_snd_data;
+ platform_device_add_data(sffsdr_snd_device, &sffsdr_snd_data,
sizeof(sffsdr_snd_data));
ret = platform_device_add_resources(sffsdr_snd_device,
sffsdr_snd_resources,
next prev parent reply other threads:[~2009-02-13 17:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2009-02-13 19:16 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090213124709.110f408d.hugo@hugovil.com \
--to=hugo@hugovil.com \
--cc=alsa-devel@alsa-project.org \
--cc=chaithrika@ti.com \
--cc=davinci-linux-open-source@linux.davincidsp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.