diff options
Diffstat (limited to 'net/bluetooth/lib.c')
-rw-r--r-- | net/bluetooth/lib.c | 27 |
1 files changed, 24 insertions, 3 deletions
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c index 86a6bed229df..506628876f36 100644 --- a/net/bluetooth/lib.c +++ b/net/bluetooth/lib.c | |||
@@ -24,6 +24,8 @@ | |||
24 | 24 | ||
25 | /* Bluetooth kernel library. */ | 25 | /* Bluetooth kernel library. */ |
26 | 26 | ||
27 | #define pr_fmt(fmt) "Bluetooth: " fmt | ||
28 | |||
27 | #include <linux/module.h> | 29 | #include <linux/module.h> |
28 | 30 | ||
29 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
@@ -151,7 +153,26 @@ int bt_to_errno(__u16 code) | |||
151 | } | 153 | } |
152 | EXPORT_SYMBOL(bt_to_errno); | 154 | EXPORT_SYMBOL(bt_to_errno); |
153 | 155 | ||
154 | int bt_printk(const char *level, const char *format, ...) | 156 | int bt_info(const char *format, ...) |
157 | { | ||
158 | struct va_format vaf; | ||
159 | va_list args; | ||
160 | int r; | ||
161 | |||
162 | va_start(args, format); | ||
163 | |||
164 | vaf.fmt = format; | ||
165 | vaf.va = &args; | ||
166 | |||
167 | r = pr_info("%pV", &vaf); | ||
168 | |||
169 | va_end(args); | ||
170 | |||
171 | return r; | ||
172 | } | ||
173 | EXPORT_SYMBOL(bt_info); | ||
174 | |||
175 | int bt_err(const char *format, ...) | ||
155 | { | 176 | { |
156 | struct va_format vaf; | 177 | struct va_format vaf; |
157 | va_list args; | 178 | va_list args; |
@@ -162,10 +183,10 @@ int bt_printk(const char *level, const char *format, ...) | |||
162 | vaf.fmt = format; | 183 | vaf.fmt = format; |
163 | vaf.va = &args; | 184 | vaf.va = &args; |
164 | 185 | ||
165 | r = printk("%sBluetooth: %pV\n", level, &vaf); | 186 | r = pr_err("%pV", &vaf); |
166 | 187 | ||
167 | va_end(args); | 188 | va_end(args); |
168 | 189 | ||
169 | return r; | 190 | return r; |
170 | } | 191 | } |
171 | EXPORT_SYMBOL(bt_printk); | 192 | EXPORT_SYMBOL(bt_err); |