[U-Boot] [PATCH] USB-CDC: Added debug output to ether.c

Reinhard Meyer u-boot at emk-elektronik.de
Thu Aug 12 00:11:02 CEST 2010


Dear Stefano Babic,
> Use DEBUG as usual to print debug output.
> 
> Signed-off-by: Stefano Babic <sbabic at denx.de>
> ---
>  drivers/usb/gadget/ether.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/usb/gadget/ether.c b/drivers/usb/gadget/ether.c
> index 3d871fa..e0ebf75 100644
> --- a/drivers/usb/gadget/ether.c
> +++ b/drivers/usb/gadget/ether.c
> @@ -31,7 +31,11 @@
>  #include "gadget_chips.h"
>  
>  #define USB_NET_NAME "usb0"
> +#ifdef DEBUG
> +#define dprintf printf
> +#else
>  #define dprintf(x, ...)
> +#endif
>  #undef INFO
>  #define INFO(x, s...)	printf(s)
>  #define dev_err(x, stuff...) printf(stuff)

Why not use the globally defined debug() [include/common.h, line 119]
macro for that?

Reinhard


More information about the U-Boot mailing list