speedtch usbatm.h,1.12,1.13

Duncan Sands duncan at infradead.org
Thu Apr 14 06:20:30 EDT 2005


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

Modified Files:
	usbatm.h 
Log Message:
Roman says:
"The appended patch changes atm_xxx macros to tag the messages with the
atm device number instead.  (I've been tempted to use atm_dev.type too,
but the atm layer uses there directly what we pass to atmdev_register(),
rather than making a private copy, and we give it the subriver's
driver_name, which can get destroyed before atm_dev is released)."


Index: usbatm.h
===================================================================
RCS file: /home/cvs/speedtch/usbatm.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- usbatm.h	7 Apr 2005 21:52:43 -0000	1.12
+++ usbatm.h	14 Apr 2005 10:20:26 -0000	1.13
@@ -59,14 +59,24 @@
 #define usb_dbg(instance, format, arg...)	\
 	dev_dbg(&(instance)->usb_intf->dev , format , ## arg)
 
+/* FIXME: move to dev_* once ATM is driver model aware */
+#define atm_printk(level, instance, format, arg...)	\
+	printk(level "ATM dev %d: " format , (instance)->atm_dev->number, ## arg)
+
 #define atm_err(instance, format, arg...)	\
-	usb_err(instance, format, ## arg)
+	atm_printk(KERN_ERR, instance , format , ## arg)
 #define atm_info(instance, format, arg...)	\
-	usb_info(instance, format, ## arg)
+	atm_printk(KERN_INFO, instance , format , ## arg)
 #define atm_warn(instance, format, arg...)	\
-	usb_warn(instance, format, ## arg)
+	atm_printk(KERN_WARNING, instance , format , ## arg)
+#ifdef DEBUG
+#define atm_dbg(instance, format, arg...)	\
+	atm_printk(KERN_DEBUG, instance , format , ## arg)
+#else
 #define atm_dbg(instance, format, arg...)	\
-	usb_dbg(instance, format, ## arg)
+	do { } while (0)
+#endif
+
 
 /* mini driver */
 




More information about the Usbatm-commits mailing list