summaryrefslogtreecommitdiffstats
path: root/net/bluetooth/lib.c
diff options
context:
space:
mode:
authorSzymon Janc <ext.szymon.janc@tieto.com>2015-09-16 20:21:53 +0200
committerMarcel Holtmann <marcel@holtmann.org>2015-09-18 09:53:19 +0200
commite781b7f7fcc141d69f63d4eef70d249549dfaeda (patch)
treec4691aca095e442d6bf912f95c7e72c146009bad /net/bluetooth/lib.c
parentce26d8137bc5c5b8371f91646bda969ed7f8b398 (diff)
downloadlinux-e781b7f7fcc141d69f63d4eef70d249549dfaeda.tar.bz2
Bluetooth: Add BT_ERR_RATELIMITED
This patch adds ratelimited version of the BT_ERR macro. Signed-off-by: Szymon Janc <ext.szymon.janc@tieto.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth/lib.c')
-rw-r--r--net/bluetooth/lib.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index b36bc0415854..8b4cdce3f62e 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -166,3 +166,19 @@ void bt_err(const char *format, ...)
va_end(args);
}
EXPORT_SYMBOL(bt_err);
+
+void bt_err_ratelimited(const char *format, ...)
+{
+ struct va_format vaf;
+ va_list args;
+
+ va_start(args, format);
+
+ vaf.fmt = format;
+ vaf.va = &args;
+
+ pr_err_ratelimited("%pV", &vaf);
+
+ va_end(args);
+}
+EXPORT_SYMBOL(bt_err_ratelimited);