Skip to content

Commit

Permalink
staging: usbip: change debug configuration option
Browse files Browse the repository at this point in the history
Change CONFIG_USB_IP_DEBUG_ENABLE to CONFIG_USB_IP_DEBUG, and move
ccflags- to the head of the makefile.

Signed-off-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
matt mooney authored and Greg Kroah-Hartman committed May 11, 2011
1 parent 0c4ac07 commit 981f30c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/usbip/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ config USB_IP_HOST
To compile this driver as a module, choose M here: the
module will be called usbip.

config USB_IP_DEBUG_ENABLE
bool "USB-IP Debug Enable"
config USB_IP_DEBUG
bool "USB/IP debug messages"
depends on USB_IP_COMMON
default N
---help---
Expand Down
5 changes: 2 additions & 3 deletions drivers/staging/usbip/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
ccflags-$(CONFIG_USB_IP_DEBUG) := -DDEBUG

obj-$(CONFIG_USB_IP_COMMON) += usbip_common_mod.o
usbip_common_mod-y := usbip_common.o usbip_event.o

Expand All @@ -6,6 +8,3 @@ vhci-hcd-y := vhci_sysfs.o vhci_tx.o vhci_rx.o vhci_hcd.o

obj-$(CONFIG_USB_IP_HOST) += usbip.o
usbip-y := stub_dev.o stub_main.o stub_rx.o stub_tx.o

ccflags-$(CONFIG_USB_IP_DEBUG_ENABLE) := -DDEBUG

2 changes: 1 addition & 1 deletion drivers/staging/usbip/usbip_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#define DRIVER_AUTHOR "Takahiro Hirofuchi <hirofuchi@users.sourceforge.net>"
#define DRIVER_DESC "USB/IP Common Driver"

#ifdef CONFIG_USB_IP_DEBUG_ENABLE
#ifdef CONFIG_USB_IP_DEBUG
unsigned long usbip_debug_flag = 0xffffffff;
#else
unsigned long usbip_debug_flag;
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/usbip/usbip_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@
#include <net/sock.h>

/**
* usbip_udbg - print debug messages if CONFIG_USB_IP_DEBUG_ENABLE is defined
* usbip_udbg - print debug messages if CONFIG_USB_IP_DEBUG is defined
* @fmt:
* @args:
*/
#ifdef CONFIG_USB_IP_DEBUG_ENABLE
#ifdef CONFIG_USB_IP_DEBUG

#define usbip_udbg(fmt, args...) \
do { \
Expand All @@ -40,11 +40,11 @@
__FILE__, __LINE__, __func__, ##args); \
} while (0)

#else /* CONFIG_USB_IP_DEBUG_ENABLE */
#else

#define usbip_udbg(fmt, args...) do { } while (0)

#endif /* CONFIG_USB_IP_DEBUG_ENABLE */
#endif /* CONFIG_USB_IP_DEBUG */

enum {
usbip_debug_xmit = (1 << 0),
Expand Down

0 comments on commit 981f30c

Please sign in to comment.