From: Randy Dunlap Date: Mon, 7 Nov 2005 13:43:23 +0000 (+0100) Subject: [ALSA] sound/hda: rate-limit timeout message X-Git-Tag: v2.6.16-rc1~474^2~22^2~3^2~280 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=362775e2125b74cd04f83fd4ef5b72ef1ee6d3a1;p=~emulex%2Finfiniband.git [ALSA] sound/hda: rate-limit timeout message Modules: HDA Intel driver Rate-limit the azx_get_response timeout message. A continuous 2 per second is too much. Signed-off-by: Randy Dunlap Signed-off-by: Andrew Morton Signed-off-by: Takashi Iwai --- diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index ed525c03c99..429ef3810b1 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -514,7 +515,9 @@ static unsigned int azx_get_response(struct hda_codec *codec) while (chip->rirb.cmds) { if (! --timeout) { - snd_printk(KERN_ERR "azx_get_response timeout\n"); + if (printk_ratelimit()) + snd_printk(KERN_ERR + "azx_get_response timeout\n"); chip->rirb.rp = azx_readb(chip, RIRBWP); chip->rirb.cmds = 0; return -1;