Yeah, it seems has _with_mutex() can be better idea.Other solution is create both snd_soc_find_dai_with_mutex()/without_mutex().I don't know how complex it is to have a unified solution. But if we
I'm not sure which style is best.
can protect snd_soc_find_dai() itself, things would be simpler may be
in long term. Right now there are separate source files for soc-core,
soc-dai and soc-component, but because of two approaches looks like
the function need to be moved around and need to be placed in
soc-core. Also the issue might go unnoticed if LOCKDEP is not enabled.
May be start with a wrapper for now and eventually unify?
I'm posting patch, but I noticed that Mark's branch vs Linus branch
have some mismatch (?), and now I'm asking it to him.
I can post _with_mutex() version as v2 if I could get answer.
After that I'm happy your next patch can re-use it.