summaryrefslogtreecommitdiff
path: root/drivers/staging/usbip/usbip_common.h
diff options
context:
space:
mode:
authormatt mooney <mfm@muteddisk.com>2011-05-19 16:47:32 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-19 16:57:30 -0700
commit1a4b6f66285785ddccef049e6b45be4e7c7a2189 (patch)
treefe745a2467162a9ab23ca37ce7872532a69f136d /drivers/staging/usbip/usbip_common.h
parentdb60697a086cdf4bbe6deedcefc2ff81e2a9efd2 (diff)
staging: usbip: replace usbip_u{dbg,err,info} and printk with dev_ and pr_
This switches all of the usbip_u{dbg,err,info} and printk statements to dev_<level>, if possible, or pr_<level> macros. And removes a few unnecessary debug statements. Signed-off-by: matt mooney <mfm@muteddisk.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/usbip/usbip_common.h')
-rw-r--r--drivers/staging/usbip/usbip_common.h46
1 files changed, 6 insertions, 40 deletions
diff --git a/drivers/staging/usbip/usbip_common.h b/drivers/staging/usbip/usbip_common.h
index fd84ab2f9c2c..4a641c552b78 100644
--- a/drivers/staging/usbip/usbip_common.h
+++ b/drivers/staging/usbip/usbip_common.h
@@ -32,25 +32,13 @@
#define USBIP_VERSION "1.0.0"
-/**
- * usbip_udbg - print debug messages if CONFIG_USB_IP_DEBUG is defined
- * @fmt:
- * @args:
- */
-#ifdef CONFIG_USB_IP_DEBUG
-
-#define usbip_udbg(fmt, args...) \
- do { \
- printk(KERN_DEBUG "%-10s:(%s,%d) %s: " fmt, \
- (in_interrupt() ? "interrupt" : (current)->comm),\
- __FILE__, __LINE__, __func__, ##args); \
- } while (0)
+#undef pr_fmt
+#ifdef DEBUG
+#define pr_fmt(fmt) KBUILD_MODNAME ": %s:%d: " fmt, __func__, __LINE__
#else
-
-#define usbip_udbg(fmt, args...) do { } while (0)
-
-#endif /* CONFIG_USB_IP_DEBUG */
+#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
+#endif
enum {
usbip_debug_xmit = (1 << 0),
@@ -85,7 +73,7 @@ extern struct device_attribute dev_attr_usbip_debug;
#define usbip_dbg_with_flag(flag, fmt, args...) \
do { \
if (flag & usbip_debug_flag) \
- usbip_udbg(fmt , ##args); \
+ pr_debug(fmt, ##args); \
} while (0)
#define usbip_dbg_sysfs(fmt, args...) \
@@ -115,28 +103,6 @@ extern struct device_attribute dev_attr_usbip_debug;
#define usbip_dbg_stub_tx(fmt, args...) \
usbip_dbg_with_flag(usbip_debug_stub_tx, fmt , ##args)
-/**
- * usbip_uerr - print error messages
- * @fmt:
- * @args:
- */
-#define usbip_uerr(fmt, args...) \
- do { \
- printk(KERN_ERR "%-10s: ***ERROR*** (%s,%d) %s: " fmt, \
- (in_interrupt() ? "interrupt" : (current)->comm),\
- __FILE__, __LINE__, __func__, ##args); \
- } while (0)
-
-/**
- * usbip_uinfo - print information messages
- * @fmt:
- * @args:
- */
-#define usbip_uinfo(fmt, args...) \
- do { \
- printk(KERN_INFO "usbip: " fmt , ## args); \
- } while (0)
-
/*
* USB/IP request headers.
* Currently, we define 4 request types: