[alsa-devel] [PATCH] ALSA: Fix prototype for snd_soc_dai_link.init() function pointer
Timur Tabi
timur at freescale.com
Mon Jun 4 18:44:51 CEST 2007
Takashi Iwai wrote:
> At Fri, 1 Jun 2007 17:44:57 -0500,
> Timur Tabi wrote:
>> Change the snd_soc_dai_link.init() function to take a pointer to the
>> corresponding snd_soc_dai_link structure, instead of a pointer to a
>> snd_soc_codec structure. This allows the initialization function to initialize
>> its own structure.
>>
>> Signed-off-by: Timur Tabi <timur at freescale.com>
>
> Liam, is this change OK for you?
> If yes, I'll add this to HG tree after 1.0.14 release.
Please note my comment in the patch. I have not compiled all the code that I changed, so
I don't know if this patch is good. I would like someone to test this patch.
This patch is just a refactoring - no new features have been added, so after applying this
patch, everything should still compile and run exactly the same.
The key code changes are:
struct snd_soc_codec *codec = dai->codec_dai->codec;
I'm hoping that 'codec' contains the same value that it did before the patch, and
err = socdev->machine->dai_link[i].init(&machine->dai_link[i]);
I hope this passes the correct snd_soc_dai_link pointer.
--
Timur Tabi
Linux Kernel Developer @ Freescale
More information about the Alsa-devel
mailing list