Commit 8bcb3f98 authored by James Bottomley's avatar James Bottomley Committed by Greg Kroah-Hartman

[PATCH] fix dev_printk to work even in the absence of an attached driver

parent ab7f7331
......@@ -400,7 +400,7 @@ extern void firmware_unregister(struct subsystem *);
/* debugging and troubleshooting/diagnostic helpers. */
#define dev_printk(level, dev, format, arg...) \
printk(level "%s %s: " format , (dev)->driver->name , (dev)->bus_id , ## arg)
printk(level "%s %s: " format , (dev)->driver ? (dev)->driver->name : "" , (dev)->bus_id , ## arg)
#ifdef DEBUG
#define dev_dbg(dev, format, arg...) \
......
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