summaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2018-05-16 20:07:18 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-09 12:20:28 +0200
commitee7b57a2099fcde6cef65c6086acf3e42e400be0 (patch)
treebd844bb2b005ae63399475f0e17f1bf7f77d3201 /sound
parent55d1f04913219fc98e6cc2a02aa29ac6eed718cc (diff)
downloadlinux-stable-ee7b57a2099fcde6cef65c6086acf3e42e400be0.tar.gz
linux-stable-ee7b57a2099fcde6cef65c6086acf3e42e400be0.tar.bz2
linux-stable-ee7b57a2099fcde6cef65c6086acf3e42e400be0.zip
ALSA: usb-audio: Apply rate limit to warning messages in URB complete callback
[ Upstream commit 377a879d9832f4ba69bd6a1fc996bb4181b1e504 ] retire_capture_urb() may print warning messages when the given URB doesn't align, and this may flood the system log easily. Put the rate limit to the message for avoiding it. Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=1093485 Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/pcm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/pcm.c b/sound/usb/pcm.c
index 0d8aba5fe1a8..946f89883ae0 100644
--- a/sound/usb/pcm.c
+++ b/sound/usb/pcm.c
@@ -1263,7 +1263,7 @@ static void retire_capture_urb(struct snd_usb_substream *subs,
if (bytes % (runtime->sample_bits >> 3) != 0) {
int oldbytes = bytes;
bytes = frames * stride;
- dev_warn(&subs->dev->dev,
+ dev_warn_ratelimited(&subs->dev->dev,
"Corrected urb data len. %d->%d\n",
oldbytes, bytes);
}