speedtch usbatm.h,1.11,1.12

Duncan Sands duncan at infradead.org
Thu Apr 7 17:52:47 EDT 2005


Update of /home/cvs/speedtch
In directory phoenix.infradead.org:/tmp/cvs-serv22846

Modified Files:
	usbatm.h 
Log Message:
Add various convenience output routines (usb_err, atm_err, ...).  Since the ATM layer hasn't
been ported to the new device model yet, atm_err and friends are currently the same as usb_err
etc.  The idea is that we want to use dev_err etc, but we have two devices: a USB device and
an ATM device.  Thus the two sets of macros.  I think we should use atm_xxx ones whenever the
ATM device is around, and otherwise use the usb_xxx ones.


Index: usbatm.h
===================================================================
RCS file: /home/cvs/speedtch/usbatm.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- usbatm.h	1 Apr 2005 10:16:22 -0000	1.11
+++ usbatm.h	7 Apr 2005 21:52:43 -0000	1.12
@@ -24,13 +24,7 @@
 #ifndef	_USBATM_H_
 #define	_USBATM_H_
 
-#include <asm/semaphore.h>
-#include <linux/atm.h>
-#include <linux/atmdev.h>
-#include <linux/completion.h>
 #include <linux/config.h>
-#include <linux/kref.h>
-#include <linux/list.h>
 
 /*
 #define DEBUG
@@ -41,6 +35,13 @@
 #	define DEBUG
 #endif
 
+#include <asm/semaphore.h>
+#include <linux/atm.h>
+#include <linux/atmdev.h>
+#include <linux/completion.h>
+#include <linux/device.h>
+#include <linux/kref.h>
+#include <linux/list.h>
 #include <linux/usb.h>
 
 #ifdef DEBUG
@@ -49,6 +50,23 @@
 #define UDSL_ASSERT(x)	do { if (!(x)) warn("failed assertion '" #x "' at line %d", __LINE__); } while(0)
 #endif
 
+#define usb_err(instance, format, arg...)	\
+	dev_err(&(instance)->usb_intf->dev , format , ## arg)
+#define usb_info(instance, format, arg...)	\
+	dev_info(&(instance)->usb_intf->dev , format , ## arg)
+#define usb_warn(instance, format, arg...)	\
+	dev_warn(&(instance)->usb_intf->dev , format , ## arg)
+#define usb_dbg(instance, format, arg...)	\
+	dev_dbg(&(instance)->usb_intf->dev , format , ## arg)
+
+#define atm_err(instance, format, arg...)	\
+	usb_err(instance, format, ## arg)
+#define atm_info(instance, format, arg...)	\
+	usb_info(instance, format, ## arg)
+#define atm_warn(instance, format, arg...)	\
+	usb_warn(instance, format, ## arg)
+#define atm_dbg(instance, format, arg...)	\
+	usb_dbg(instance, format, ## arg)
 
 /* mini driver */
 




More information about the Usbatm-commits mailing list