summaryrefslogtreecommitdiff
path: root/net/bluetooth/lib.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2011-07-15 08:51:13 -0700
committerDavid S. Miller <davem@davemloft.net>2011-07-15 08:51:13 -0700
commit25009a1ae1171eda6bff44b7e44eb0e076713811 (patch)
tree182491960c3f837d12880a2f94369c8ebd8d1fcd /net/bluetooth/lib.c
parent6864ddb2d3089739d29418a1ff52adb2fbf9c0ca (diff)
parent95a943c162d74b20d869917bdf5df11293c35b63 (diff)
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'net/bluetooth/lib.c')
-rw-r--r--net/bluetooth/lib.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/net/bluetooth/lib.c b/net/bluetooth/lib.c
index b826d1bf10df..86a6bed229df 100644
--- a/net/bluetooth/lib.c
+++ b/net/bluetooth/lib.c
@@ -59,7 +59,7 @@ char *batostr(bdaddr_t *ba)
EXPORT_SYMBOL(batostr);
/* Bluetooth error codes to Unix errno mapping */
-int bt_err(__u16 code)
+int bt_to_errno(__u16 code)
{
switch (code) {
case 0:
@@ -149,4 +149,23 @@ int bt_err(__u16 code)
return ENOSYS;
}
}
-EXPORT_SYMBOL(bt_err);
+EXPORT_SYMBOL(bt_to_errno);
+
+int bt_printk(const char *level, const char *format, ...)
+{
+ struct va_format vaf;
+ va_list args;
+ int r;
+
+ va_start(args, format);
+
+ vaf.fmt = format;
+ vaf.va = &args;
+
+ r = printk("%sBluetooth: %pV\n", level, &vaf);
+
+ va_end(args);
+
+ return r;
+}
+EXPORT_SYMBOL(bt_printk);