ChangeSet 1.879.9.14, 2003/01/07 14:51:34-08:00, greg@kroah.com [PATCH] DEV: change dev_printk() to take a pointer to dev instead of the structure itself. This was suggested by many people, Randy Dunlap being the most vocal :) diff -Nru a/include/linux/device.h b/include/linux/device.h --- a/include/linux/device.h Wed Jan 8 11:59:18 2003 +++ b/include/linux/device.h Wed Jan 8 11:59:18 2003 @@ -396,21 +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) +#define dev_printk(level, dev, format, arg...) \ + printk(level "%s %s: " format , (dev)->driver->name , (dev)->bus_id , ## arg) #ifdef DEBUG #define dev_dbg(dev, format, arg...) \ - dev_printk(KERN_DEBUG , (dev) , format , ## 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...) \ - dev_printk(KERN_ERR , (dev) , format , ## arg) + dev_printk(KERN_ERR , dev , format , ## arg) #define dev_info(dev, format, arg...) \ - dev_printk(KERN_INFO , (dev) , format , ## arg) + dev_printk(KERN_INFO , dev , format , ## arg) #define dev_warn(dev, format, arg...) \ - dev_printk(KERN_WARNING , (dev) , format , ## arg) + dev_printk(KERN_WARNING , dev , format , ## arg) #endif /* _DEVICE_H_ */