diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-07-19 11:02:56 -0700 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2016-07-19 11:02:56 -0700 |
commit | 8c57a5e7b2820f349c95b8c8393fec1e0f4070d2 (patch) | |
tree | 8ef0f3c986968392ccdc70ca43b23eba729e2019 /tools/lib/api/debug-internal.h | |
parent | 0bb11e969f5367dcb661f9fcc77efd5d58a2c470 (diff) | |
parent | 6a5029e66404462a3322dba8e35615bd09332081 (diff) |
Merge branch 'for-linus' into next
Sync up to bring in wacom_w8001 changes to avoid merge conflicts later.
Diffstat (limited to 'tools/lib/api/debug-internal.h')
-rw-r--r-- | tools/lib/api/debug-internal.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tools/lib/api/debug-internal.h b/tools/lib/api/debug-internal.h new file mode 100644 index 000000000000..188f7880eafe --- /dev/null +++ b/tools/lib/api/debug-internal.h @@ -0,0 +1,20 @@ +#ifndef __API_DEBUG_INTERNAL_H__ +#define __API_DEBUG_INTERNAL_H__ + +#include "debug.h" + +#define __pr(func, fmt, ...) \ +do { \ + if ((func)) \ + (func)("libapi: " fmt, ##__VA_ARGS__); \ +} while (0) + +extern libapi_print_fn_t __pr_warning; +extern libapi_print_fn_t __pr_info; +extern libapi_print_fn_t __pr_debug; + +#define pr_warning(fmt, ...) __pr(__pr_warning, fmt, ##__VA_ARGS__) +#define pr_info(fmt, ...) __pr(__pr_info, fmt, ##__VA_ARGS__) +#define pr_debug(fmt, ...) __pr(__pr_debug, fmt, ##__VA_ARGS__) + +#endif /* __API_DEBUG_INTERNAL_H__ */ |