diff options
| author | Felipe Balbi <felipe.balbi@nokia.com> | 2008-08-10 21:22:35 +0300 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-08-21 10:26:34 -0700 | 
| commit | e8164f64caff68d4e878e1719d88d145faa75f1d (patch) | |
| tree | bcf46d52a12d2ecb5acd6cdac8bb15e5aabc3f58 | |
| parent | 746cdd0b2d1254b11382789b6630c4d379bdcf13 (diff) | |
| download | olio-linux-3.10-e8164f64caff68d4e878e1719d88d145faa75f1d.tar.xz olio-linux-3.10-e8164f64caff68d4e878e1719d88d145faa75f1d.zip  | |
usb: musb: get rid of MUSB_LOGLEVEL and use parameter
We can change debugging level on the fly via
/sys/module/musb_hdrc/parameters/debug.
We can also get rid of the LOGLEVEL facility in Kconfig
and rely only in module parameter.
Cc: Anand Gadiyar <gadiyar@ti.com>
Cc: Bryan Wu <bryan.wu@analog.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| -rw-r--r-- | drivers/usb/musb/Kconfig | 13 | ||||
| -rw-r--r-- | drivers/usb/musb/Makefile | 16 | ||||
| -rw-r--r-- | drivers/usb/musb/musb_core.c | 17 | ||||
| -rw-r--r-- | drivers/usb/musb/musb_debug.h | 4 | 
4 files changed, 12 insertions, 38 deletions
diff --git a/drivers/usb/musb/Kconfig b/drivers/usb/musb/Kconfig index faca4333f27..a0017486ad4 100644 --- a/drivers/usb/musb/Kconfig +++ b/drivers/usb/musb/Kconfig @@ -165,12 +165,11 @@ config USB_TUSB_OMAP_DMA  	help  	  Enable DMA transfers on TUSB 6010 when OMAP DMA is available. -config	USB_MUSB_LOGLEVEL +config	USB_MUSB_DEBUG  	depends on USB_MUSB_HDRC -	int  'Logging Level (0 - none / 3 - annoying / ... )' -	default 0 +	bool "Enable debugging messages" +	default n  	help -	  Set the logging level. 0 disables the debugging altogether, -	  although when USB_DEBUG is set the value is at least 1. -	  Starting at level 3, per-transfer (urb, usb_request, packet, -	  or dma transfer) tracing may kick in. +	  This enables musb debugging. To set the logging level use the debug +	  module parameter. Starting at level 3, per-transfer (urb, usb_request, +	  packet, or dma transfer) tracing may kick in. diff --git a/drivers/usb/musb/Makefile b/drivers/usb/musb/Makefile index 860369c7cbe..b6af0d687a7 100644 --- a/drivers/usb/musb/Makefile +++ b/drivers/usb/musb/Makefile @@ -64,18 +64,6 @@ endif  # Debugging -MUSB_DEBUG:=$(CONFIG_USB_MUSB_LOGLEVEL) - -ifeq ("$(strip $(MUSB_DEBUG))","") -    ifdef CONFIG_USB_DEBUG -	MUSB_DEBUG:=1 -    else -	MUSB_DEBUG:=0 -    endif +ifeq ($(CONFIG_USB_MUSB_DEBUG),y) +	EXTRA_CFLAGS += -DDEBUG  endif - -ifneq ($(MUSB_DEBUG),0) -    EXTRA_CFLAGS += -DDEBUG -endif - -EXTRA_CFLAGS += -DMUSB_DEBUG=$(MUSB_DEBUG) diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index 99690ba436d..c5b8f0296fc 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -114,23 +114,14 @@ -#if MUSB_DEBUG > 0 -unsigned debug = MUSB_DEBUG; -module_param(debug, uint, 0); -MODULE_PARM_DESC(debug, "initial debug message level"); - -#define MUSB_VERSION_SUFFIX	"/dbg" -#endif +unsigned debug; +module_param(debug, uint, S_IRUGO | S_IWUSR); +MODULE_PARM_DESC(debug, "Debug message level. Default = 0");  #define DRIVER_AUTHOR "Mentor Graphics, Texas Instruments, Nokia"  #define DRIVER_DESC "Inventra Dual-Role USB Controller Driver" -#define MUSB_VERSION_BASE "6.0" - -#ifndef MUSB_VERSION_SUFFIX -#define MUSB_VERSION_SUFFIX	"" -#endif -#define MUSB_VERSION	MUSB_VERSION_BASE MUSB_VERSION_SUFFIX +#define MUSB_VERSION "6.0"  #define DRIVER_INFO DRIVER_DESC ", v" MUSB_VERSION diff --git a/drivers/usb/musb/musb_debug.h b/drivers/usb/musb/musb_debug.h index 3bdb311e820..4d2794441b1 100644 --- a/drivers/usb/musb/musb_debug.h +++ b/drivers/usb/musb/musb_debug.h @@ -48,11 +48,7 @@  				__func__, __LINE__ , ## args); \  	} } while (0) -#if MUSB_DEBUG > 0  extern unsigned debug; -#else -#define debug	0 -#endif  static inline int _dbg_level(unsigned l)  {  |