Commit b874f98e authored by James Keniston's avatar James Keniston Committed by Greg Kroah-Hartman

[PATCH] dev_printk macro

parent 6f815233
...@@ -396,22 +396,21 @@ extern int firmware_register(struct subsystem *); ...@@ -396,22 +396,21 @@ extern int firmware_register(struct subsystem *);
extern void firmware_unregister(struct subsystem *); extern void firmware_unregister(struct subsystem *);
/* debugging and troubleshooting/diagnostic helpers. */ /* 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 #ifdef DEBUG
#define dev_dbg(dev, format, arg...) \ #define dev_dbg(dev, format, arg...) \
printk (KERN_DEBUG "%s %s: " format , \ dev_printk(KERN_DEBUG , (dev) , format , ## arg)
(dev).driver->name , (dev).bus_id , ## arg)
#else #else
#define dev_dbg(dev, format, arg...) do {} while (0) #define dev_dbg(dev, format, arg...) do {} while (0)
#endif #endif
#define dev_err(dev, format, arg...) \ #define dev_err(dev, format, arg...) \
printk (KERN_ERR "%s %s: " format , \ dev_printk(KERN_ERR , (dev) , format , ## arg)
(dev).driver->name , (dev).bus_id , ## arg)
#define dev_info(dev, format, arg...) \ #define dev_info(dev, format, arg...) \
printk (KERN_INFO "%s %s: " format , \ dev_printk(KERN_INFO , (dev) , format , ## arg)
(dev).driver->name , (dev).bus_id , ## arg)
#define dev_warn(dev, format, arg...) \ #define dev_warn(dev, format, arg...) \
printk (KERN_WARNING "%s %s: " format , \ dev_printk(KERN_WARNING , (dev) , format , ## arg)
(dev).driver->name , (dev).bus_id , ## arg)
#endif /* _DEVICE_H_ */ #endif /* _DEVICE_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment