[alsa-devel] Improving or replacing snd_printk()

Joe Perches joe at perches.com
Fri May 31 19:06:38 CEST 2013


On Fri, 2013-05-31 at 16:34 +0200, Takashi Iwai wrote:
> Also, another expected problem is that neither card->card_dev nor
> card->dev are set when snd_card_err() is called.  Many drivers set the
> device pointers at the late stage just before the device
> registration.  So, systematic replacements won't work as expected in
> many cases.  (The same is applied for replacement with dev_*(), too.)

If all the pointers are null, then the logging function could
use pr_<level> and %pf, __builtin_return_addr() or another
method to look up the module name.




More information about the Alsa-devel mailing list