On 11/01/2019 08:51, Kuninori Morimoto wrote:
Indeed there is such case so far, but my understanding is that current driver should select "legacy style" or "modern style". If driver setup it as "legacy", but access to "modern" member, it is driver side bug, right ?
Yes absolutely it is a driver bug, but looking at the snd_soc_dai_link structure today it is not clear what the driver should be setting and what is 'modern' and what is 'legacy'. You need to dig through the git history and code to figure this out. So you could say it is not very well documented/commented from a soc-core perspective and could be easy for a driver writer to get themselves in a pickle/mess. Anyway, that is easy to fix and we could add some comments to clear it up.
Thank you for your feedback. Yes, indeed there is no enough information/documentation about legacy/modern style, and its plan (= all driver will be switched to modern, legacy will be removed, etc, etc..).
So, can you agree about these ?
- Add enough information/documentation about legacy/modern style and its plan.
- Add dirty pointer fixup patch as workaround
- switch to modern style as much as possible
I think that Mark needs to decided on whether use your 'dirty pointer' fix or not.
Jon