Re: [PATCH] ASoC: cs42l56: fix DT probe

From: Charles Keepax
Date: Thu Jan 26 2023 - 09:47:46 EST


On Thu, Jan 26, 2023 at 02:03:35PM +0000, Mark Brown wrote:
> On Thu, Jan 26, 2023 at 02:55:29PM +0100, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@xxxxxxxx>
> >
> > While looking through legacy platform data users, I noticed that
> > this one could never be used with DT based probing as the
> > platform_data structure gets overwritten directly after it
> > is initialized.
> >
> > There have never been any boards defining the platform_data in
> > the mainline kernel either, so this driver so far only worked
> > with patched kernels.
>
> Or there is no mandatory properties/platform data and the
> defaults are fine for most systems (which is a common case).

I think Arnd is right here, the driver appears to allocate a big
block of zeros and then blat that over the top of everything it
read from device tree. So you can literally never use any of the
DT properties as it stands.

Acked-by: Charles Keepax <ckeepax@xxxxxxxxxxxxxxxxxxxxx>

Thanks,
Charles