[alsa-devel] Commit 8f7206d69a ("ASoC: imx-wm8962: Remove global variables") looks strange
Fabio Estevam
festevam at gmail.com
Mon Feb 26 15:34:44 CET 2018
Hi Daniel,
On Mon, Feb 26, 2018 at 11:21 AM, Daniel Baluta <daniel.baluta at nxp.com> wrote:
> Hi Fabio,
>
> Leonard (Cc'ed) noticed that commit in $subject looks very strange.
>
> For example:
>
> @@ -139,7 +140,7 @@ static int imx_wm8962_late_probe(struct snd_soc_card *card)
> {
> struct snd_soc_pcm_runtime *rtd;
> struct snd_soc_dai *codec_dai;
> - struct imx_priv *priv = &card_priv;
> + struct imx_priv *priv = snd_soc_card_get_drvdata(card);
> struct imx_wm8962_data *data = snd_soc_card_get_drvdata(card);
>
> So, now data and priv point to the same memory area but they are completely
> different structures!
>
> Unless we are missing something this is obviously a bug. I will try to have a look at
> the end of the week, but any comments are welcome.
>
> I think the fix would be to have one global priv structure and to unify imx_wm8962_data
> with imx_priv.
Could you please look in mainline? The structs were re arranged there
and I do not see this problem.
Please confirm.
More information about the Alsa-devel
mailing list