From dd64c151b978dc78ed535433d930c75b5c15deeb Mon Sep 17 00:00:00 2001 From: Jiri Kosina Date: Tue, 30 Jan 2007 16:02:24 +0100 Subject: HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG CONFIG_INPUT_DEBUG is non-existent option, so remove anything depending on it. Also, as we have new CONFIG_HID_DEBUG, this should be used on places where ifdef DEBUG was used before. Suggested by Adrian Bunk. Signed-off-by: Jiri Kosina --- drivers/hid/Makefile | 15 ++------------- drivers/hid/hid-core.c | 6 ++---- drivers/hid/hid-debug.c | 1 - drivers/hid/hid-input.c | 6 ++---- 4 files changed, 6 insertions(+), 22 deletions(-) (limited to 'drivers/hid') diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 84c823eb5ad..52e97d8f3c9 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile @@ -1,19 +1,8 @@ # # Makefile for the HID driver # - -# Multipart objects. -hid-objs := hid-core.o hid-input.o - -# Optional parts of multipart objects. -ifeq ($(CONFIG_HID_DEBUG),y) -hid-objs += hid-debug.o -endif - -ifeq ($(CONFIG_INPUT_DEBUG),y) -EXTRA_CFLAGS += -DDEBUG -endif - +hid-objs := hid-core.o hid-input.o obj-$(CONFIG_HID) += hid.o +hid-$(CONFIG_HID_DEBUG) += hid-debug.o diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 0796f64b3c5..8c7d48eff7b 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c @@ -28,8 +28,6 @@ #include #include -#undef DEBUG_DATA - #include #include #include @@ -951,7 +949,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i return -1; } -#ifdef DEBUG_DATA +#ifdef CONFIG_HID_DEBUG printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", size, report_enum->numbered ? "" : "un"); #endif @@ -961,7 +959,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i size--; } -#ifdef DEBUG_DATA +#ifdef CONFIG_HID_DEBUG { int i; printk(KERN_DEBUG __FILE__ ": report %d (size %u) = ", n, size); diff --git a/drivers/hid/hid-debug.c b/drivers/hid/hid-debug.c index d6abe3494c0..89241be4ec9 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c @@ -28,7 +28,6 @@ * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic */ -//#include #include struct hid_usage_entry { diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 4824b19b864..25d180a24fc 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@ -31,8 +31,6 @@ #include #include -#undef DEBUG - #include #include @@ -253,7 +251,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel field->hidinput = hidinput; -#ifdef DEBUG +#ifdef CONFIG_HID_DEBUG printk(KERN_DEBUG "Mapping: "); hid_resolv_usage(usage->hid); printk(" ---> "); @@ -690,7 +688,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel return; ignore: -#ifdef DEBUG +#ifdef CONFIG_HID_DEBUG printk("IGNORED\n"); #endif return; -- cgit v1.2.3-70-g09d2