# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.573.92.16 -> 1.573.92.17
#	include/linux/device.h	1.39    -> 1.40   
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 02/10/08	dsteklof@us.ibm.com	1.573.92.17
# driver core: add generic logging macros for devices.
# --------------------------------------------
#
diff -Nru a/include/linux/device.h b/include/linux/device.h
--- a/include/linux/device.h	Tue Oct  8 15:53:41 2002
+++ b/include/linux/device.h	Tue Oct  8 15:53:41 2002
@@ -421,4 +421,23 @@
 extern void device_resume(u32 level);
 extern void device_shutdown(void);
 
+/* debugging and troubleshooting/diagnostic helpers. */
+#ifdef DEBUG
+#define dev_dbg(dev, format, arg...)		\
+	printk (KERN_DEBUG "%s %s: " format ,	\
+		dev.driver->name , dev.bus_id , ## arg)
+#else
+#define dev_dbg(dev, format, arg...) do {} while (0)
+#endif
+
+#define dev_err(dev, format, arg...)		\
+	printk (KERN_ERR "%s %s: " format ,	\
+		dev.driver->name , dev.bus_id , ## arg)
+#define dev_info(dev, format, arg...)		\
+	printk (KERN_INFO "%s %s: " format ,	\
+		dev.driver->name , dev.bus_id , ## arg)
+#define dev_warn(dev, format, arg...)		\
+	printk (KERN_WARN "%s %s: " format ,	\
+		dev.driver->name , dev.bus_id , ## arg)
+
 #endif /* _DEVICE_H_ */
