Re: [PATCH]: ARM DaVinci ASoC: Fix module unload error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hugo Villeneuve <hugo@xxxxxxxxxxx> writes:

> On Fri, 13 Feb 2009 12:39:39 +0530
> chaithrika@xxxxxx wrote:
>
>> From: Chaithrika U S <chaithrika@xxxxxx>
>> 
>> 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@xxxxxx>
>> ---
>>  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,

Hugo,

I will fold your change into Chaithrika's original patch.

Thanks,


Kevin
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux