Commit ea0e6276 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Felipe Balbi

usb: gadget: add multiple definition guards

If f_fs.c and u_serial.c are combined together using #include, which has
been a common practice so far, the pr_vdebug macro is defined multiple
times. Define it only once.
Acked-by: default avatarRandy Dunlap <rdunlap@xenotime.net>
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 4cbe5a55
...@@ -34,11 +34,15 @@ ...@@ -34,11 +34,15 @@
/* Debugging ****************************************************************/ /* Debugging ****************************************************************/
#ifdef VERBOSE_DEBUG #ifdef VERBOSE_DEBUG
#ifndef pr_vdebug
# define pr_vdebug pr_debug # define pr_vdebug pr_debug
#endif /* pr_vdebug */
# define ffs_dump_mem(prefix, ptr, len) \ # define ffs_dump_mem(prefix, ptr, len) \
print_hex_dump_bytes(pr_fmt(prefix ": "), DUMP_PREFIX_NONE, ptr, len) print_hex_dump_bytes(pr_fmt(prefix ": "), DUMP_PREFIX_NONE, ptr, len)
#else #else
#ifndef pr_vdebug
# define pr_vdebug(...) do { } while (0) # define pr_vdebug(...) do { } while (0)
#endif /* pr_vdebug */
# define ffs_dump_mem(prefix, ptr, len) do { } while (0) # define ffs_dump_mem(prefix, ptr, len) do { } while (0)
#endif /* VERBOSE_DEBUG */ #endif /* VERBOSE_DEBUG */
......
...@@ -132,11 +132,15 @@ static unsigned n_ports; ...@@ -132,11 +132,15 @@ static unsigned n_ports;
#ifdef VERBOSE_DEBUG #ifdef VERBOSE_DEBUG
#ifndef pr_vdebug
#define pr_vdebug(fmt, arg...) \ #define pr_vdebug(fmt, arg...) \
pr_debug(fmt, ##arg) pr_debug(fmt, ##arg)
#endif /* pr_vdebug */
#else #else
#ifndef pr_vdebig
#define pr_vdebug(fmt, arg...) \ #define pr_vdebug(fmt, arg...) \
({ if (0) pr_debug(fmt, ##arg); }) ({ if (0) pr_debug(fmt, ##arg); })
#endif /* pr_vdebug */
#endif #endif
/*-------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------*/
......
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