diff options
author | Duncan Sands <baldrick@free.fr> | 2006-01-17 05:15:13 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-01-31 20:23:39 -0500 |
commit | 0ec3c7e856319b600311750d784262caa8ed94b9 (patch) | |
tree | 86d0b3aa9105a8b92bbfc514c5964c9abe7da0e7 /drivers/usb/atm/usbatm.h | |
parent | 7ce08c93e388922e25a96a7d9895784182e4c72c (diff) |
[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.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/drivers/usb/atm/usbatm.h b/drivers/usb/atm/usbatm.h index 1adacd60d713..ebb79da4cb15 100644 --- a/drivers/usb/atm/usbatm.h +++ b/drivers/usb/atm/usbatm.h | |||
@@ -24,22 +24,21 @@ | |||
24 | #ifndef _USBATM_H_ | 24 | #ifndef _USBATM_H_ |
25 | #define _USBATM_H_ | 25 | #define _USBATM_H_ |
26 | 26 | ||
27 | #include <linux/config.h> | ||
28 | |||
29 | /* | ||
30 | #define VERBOSE_DEBUG | ||
31 | */ | ||
32 | |||
33 | #include <asm/semaphore.h> | 27 | #include <asm/semaphore.h> |
34 | #include <linux/atm.h> | 28 | #include <linux/atm.h> |
35 | #include <linux/atmdev.h> | 29 | #include <linux/atmdev.h> |
36 | #include <linux/completion.h> | 30 | #include <linux/completion.h> |
37 | #include <linux/device.h> | 31 | #include <linux/device.h> |
32 | #include <linux/kernel.h> | ||
38 | #include <linux/kref.h> | 33 | #include <linux/kref.h> |
39 | #include <linux/list.h> | 34 | #include <linux/list.h> |
40 | #include <linux/stringify.h> | 35 | #include <linux/stringify.h> |
41 | #include <linux/usb.h> | 36 | #include <linux/usb.h> |
42 | 37 | ||
38 | /* | ||
39 | #define VERBOSE_DEBUG | ||
40 | */ | ||
41 | |||
43 | #ifdef DEBUG | 42 | #ifdef DEBUG |
44 | #define UDSL_ASSERT(x) BUG_ON(!(x)) | 43 | #define UDSL_ASSERT(x) BUG_ON(!(x)) |
45 | #else | 44 | #else |
@@ -52,8 +51,13 @@ | |||
52 | dev_info(&(instance)->usb_intf->dev , format , ## arg) | 51 | dev_info(&(instance)->usb_intf->dev , format , ## arg) |
53 | #define usb_warn(instance, format, arg...) \ | 52 | #define usb_warn(instance, format, arg...) \ |
54 | dev_warn(&(instance)->usb_intf->dev , format , ## arg) | 53 | dev_warn(&(instance)->usb_intf->dev , format , ## arg) |
54 | #ifdef DEBUG | ||
55 | #define usb_dbg(instance, format, arg...) \ | ||
56 | dev_printk(KERN_DEBUG , &(instance)->usb_intf->dev , format , ## arg) | ||
57 | #else | ||
55 | #define usb_dbg(instance, format, arg...) \ | 58 | #define usb_dbg(instance, format, arg...) \ |
56 | dev_dbg(&(instance)->usb_intf->dev , format , ## arg) | 59 | do {} while (0) |
60 | #endif | ||
57 | 61 | ||
58 | /* FIXME: move to dev_* once ATM is driver model aware */ | 62 | /* FIXME: move to dev_* once ATM is driver model aware */ |
59 | #define atm_printk(level, instance, format, arg...) \ | 63 | #define atm_printk(level, instance, format, arg...) \ |
@@ -69,9 +73,14 @@ | |||
69 | #ifdef DEBUG | 73 | #ifdef DEBUG |
70 | #define atm_dbg(instance, format, arg...) \ | 74 | #define atm_dbg(instance, format, arg...) \ |
71 | atm_printk(KERN_DEBUG, instance , format , ## arg) | 75 | atm_printk(KERN_DEBUG, instance , format , ## arg) |
76 | #define atm_rldbg(instance, format, arg...) \ | ||
77 | if (printk_ratelimit()) \ | ||
78 | atm_printk(KERN_DEBUG, instance , format , ## arg) | ||
72 | #else | 79 | #else |
73 | #define atm_dbg(instance, format, arg...) \ | 80 | #define atm_dbg(instance, format, arg...) \ |
74 | do {} while (0) | 81 | do {} while (0) |
82 | #define atm_rldbg(instance, format, arg...) \ | ||
83 | do {} while (0) | ||
75 | #endif | 84 | #endif |
76 | 85 | ||
77 | 86 | ||
@@ -171,7 +180,7 @@ struct usbatm_data { | |||
171 | struct usbatm_channel tx_channel; | 180 | struct usbatm_channel tx_channel; |
172 | 181 | ||
173 | struct sk_buff_head sndqueue; | 182 | struct sk_buff_head sndqueue; |
174 | struct sk_buff *current_skb; /* being emptied */ | 183 | struct sk_buff *current_skb; /* being emptied */ |
175 | 184 | ||
176 | struct urb *urbs[0]; | 185 | struct urb *urbs[0]; |
177 | }; | 186 | }; |