summaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/usbatm.h
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2006-01-17 11:15:13 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2006-01-31 17:23:39 -0800
commit0ec3c7e856319b600311750d784262caa8ed94b9 (patch)
tree86d0b3aa9105a8b92bbfc514c5964c9abe7da0e7 /drivers/usb/atm/usbatm.h
parent7ce08c93e388922e25a96a7d9895784182e4c72c (diff)
downloadop-kernel-dev-0ec3c7e856319b600311750d784262caa8ed94b9.zip
op-kernel-dev-0ec3c7e856319b600311750d784262caa8ed94b9.tar.gz
[PATCH] USBATM: trivial modifications
Formatting, changes to variable names, comments, log level changes, printk rate limiting. Signed-off-by: Duncan Sands <baldrick@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/atm/usbatm.h')
-rw-r--r--drivers/usb/atm/usbatm.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h
index 1adacd6..ebb79da 100644
--- a/drivers/usb/atm/usbatm.h
+++ b/drivers/usb/atm/usbatm.h
@@ -24,22 +24,21 @@
#ifndef _USBATM_H_
#define _USBATM_H_
-#include <linux/config.h>
-
-/*
-#define VERBOSE_DEBUG
-*/
-
#include <asm/semaphore.h>
#include <linux/atm.h>
#include <linux/atmdev.h>
#include <linux/completion.h>
#include <linux/device.h>
+#include <linux/kernel.h>
#include <linux/kref.h>
#include <linux/list.h>
#include <linux/stringify.h>
#include <linux/usb.h>
+/*
+#define VERBOSE_DEBUG
+*/
+
#ifdef DEBUG
#define UDSL_ASSERT(x) BUG_ON(!(x))
#else
@@ -52,8 +51,13 @@
dev_info(&(instance)->usb_intf->dev , format , ## arg)
#define usb_warn(instance, format, arg...) \
dev_warn(&(instance)->usb_intf->dev , format , ## arg)
+#ifdef DEBUG
+#define usb_dbg(instance, format, arg...) \
+ dev_printk(KERN_DEBUG , &(instance)->usb_intf->dev , format , ## arg)
+#else
#define usb_dbg(instance, format, arg...) \
- dev_dbg(&(instance)->usb_intf->dev , format , ## arg)
+ do {} while (0)
+#endif
/* FIXME: move to dev_* once ATM is driver model aware */
#define atm_printk(level, instance, format, arg...) \
@@ -69,9 +73,14 @@
#ifdef DEBUG
#define atm_dbg(instance, format, arg...) \
atm_printk(KERN_DEBUG, instance , format , ## arg)
+#define atm_rldbg(instance, format, arg...) \
+ if (printk_ratelimit()) \
+ atm_printk(KERN_DEBUG, instance , format , ## arg)
#else
#define atm_dbg(instance, format, arg...) \
do {} while (0)
+#define atm_rldbg(instance, format, arg...) \
+ do {} while (0)
#endif
@@ -171,7 +180,7 @@ struct usbatm_data {
struct usbatm_channel tx_channel;
struct sk_buff_head sndqueue;
- struct sk_buff *current_skb; /* being emptied */
+ struct sk_buff *current_skb; /* being emptied */
struct urb *urbs[0];
};
OpenPOWER on IntegriCloud