ChangeSet 1.865.28.18, 2002/12/21 23:54:35-08:00, jkenisto@us.ibm.com [PATCH] dev_printk macro diff -Nru a/include/linux/device.h b/include/linux/device.h --- a/include/linux/device.h Sun Dec 22 00:37:52 2002 +++ b/include/linux/device.h Sun Dec 22 00:37:52 2002 @@ -396,22 +396,21 @@ extern void firmware_unregister(struct subsystem *); /* debugging and troubleshooting/diagnostic helpers. */ +#define dev_printk(sev, dev, format, arg...) \ + printk(sev "%s %s: " format , (dev).driver->name , (dev).bus_id , ## arg) + #ifdef DEBUG #define dev_dbg(dev, format, arg...) \ - printk (KERN_DEBUG "%s %s: " format , \ - (dev).driver->name , (dev).bus_id , ## arg) + dev_printk(KERN_DEBUG , (dev) , format , ## 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) + dev_printk(KERN_ERR , (dev) , format , ## arg) #define dev_info(dev, format, arg...) \ - printk (KERN_INFO "%s %s: " format , \ - (dev).driver->name , (dev).bus_id , ## arg) + dev_printk(KERN_INFO , (dev) , format , ## arg) #define dev_warn(dev, format, arg...) \ - printk (KERN_WARNING "%s %s: " format , \ - (dev).driver->name , (dev).bus_id , ## arg) + dev_printk(KERN_WARNING , (dev) , format , ## arg) #endif /* _DEVICE_H_ */