Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 289429
b: refs/heads/master
c: e688355
h: refs/heads/master
i:
  289427: fedd7ed
v: v3
  • Loading branch information
Johan Hovold authored and Greg Kroah-Hartman committed Feb 9, 2012
1 parent 8ae77ce commit 1a43f43
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d35e70d50a0641ebc1502fd343bef9b4011ada27
refs/heads/master: e688355bfeadf17ef522b1e62cc12f8e88e69667
15 changes: 15 additions & 0 deletions trunk/include/linux/usb/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,5 +389,20 @@ do { \
printk(KERN_DEBUG "%s: " format "\n", __FILE__, ##arg); \
} while (0)

/*
* Macro for reporting errors in write path to avoid inifinite loop
* when port is used as a console.
*/
#define dev_err_console(usport, fmt, ...) \
do { \
static bool __print_once; \
struct usb_serial_port *__port = (usport); \
\
if (!__port->port.console || !__print_once) { \
__print_once = true; \
dev_err(&__port->dev, fmt, ##__VA_ARGS__); \
} \
} while (0)

#endif /* __LINUX_USB_SERIAL_H */

0 comments on commit 1a43f43

Please sign in to comment.