diff options
author | Jiri Kosina <jkosina@suse.cz> | 2007-01-30 10:02:24 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2007-02-05 04:00:45 -0500 |
commit | dd64c151b978dc78ed535433d930c75b5c15deeb (patch) | |
tree | 4acccad91bee0a5bcab5d7d87cdc35cfbea9ec2a | |
parent | 43c7bf0472ec1f813fccc6012654399345898491 (diff) |
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 <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/Makefile | 15 | ||||
-rw-r--r-- | drivers/hid/hid-core.c | 6 | ||||
-rw-r--r-- | drivers/hid/hid-debug.c | 1 | ||||
-rw-r--r-- | drivers/hid/hid-input.c | 6 |
4 files changed, 6 insertions, 22 deletions
diff --git a/drivers/hid/Makefile b/drivers/hid/Makefile index 84c823eb5ad5..52e97d8f3c95 100644 --- a/drivers/hid/Makefile +++ b/drivers/hid/Makefile | |||
@@ -1,19 +1,8 @@ | |||
1 | # | 1 | # |
2 | # Makefile for the HID driver | 2 | # Makefile for the HID driver |
3 | # | 3 | # |
4 | 4 | hid-objs := hid-core.o hid-input.o | |
5 | # Multipart objects. | ||
6 | hid-objs := hid-core.o hid-input.o | ||
7 | |||
8 | # Optional parts of multipart objects. | ||
9 | ifeq ($(CONFIG_HID_DEBUG),y) | ||
10 | hid-objs += hid-debug.o | ||
11 | endif | ||
12 | |||
13 | ifeq ($(CONFIG_INPUT_DEBUG),y) | ||
14 | EXTRA_CFLAGS += -DDEBUG | ||
15 | endif | ||
16 | |||
17 | 5 | ||
18 | obj-$(CONFIG_HID) += hid.o | 6 | obj-$(CONFIG_HID) += hid.o |
7 | hid-$(CONFIG_HID_DEBUG) += hid-debug.o | ||
19 | 8 | ||
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c index 0796f64b3c54..8c7d48eff7b7 100644 --- a/drivers/hid/hid-core.c +++ b/drivers/hid/hid-core.c | |||
@@ -28,8 +28,6 @@ | |||
28 | #include <linux/input.h> | 28 | #include <linux/input.h> |
29 | #include <linux/wait.h> | 29 | #include <linux/wait.h> |
30 | 30 | ||
31 | #undef DEBUG_DATA | ||
32 | |||
33 | #include <linux/hid.h> | 31 | #include <linux/hid.h> |
34 | #include <linux/hiddev.h> | 32 | #include <linux/hiddev.h> |
35 | #include <linux/hid-debug.h> | 33 | #include <linux/hid-debug.h> |
@@ -951,7 +949,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i | |||
951 | return -1; | 949 | return -1; |
952 | } | 950 | } |
953 | 951 | ||
954 | #ifdef DEBUG_DATA | 952 | #ifdef CONFIG_HID_DEBUG |
955 | printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", size, report_enum->numbered ? "" : "un"); | 953 | printk(KERN_DEBUG __FILE__ ": report (size %u) (%snumbered)\n", size, report_enum->numbered ? "" : "un"); |
956 | #endif | 954 | #endif |
957 | 955 | ||
@@ -961,7 +959,7 @@ int hid_input_report(struct hid_device *hid, int type, u8 *data, int size, int i | |||
961 | size--; | 959 | size--; |
962 | } | 960 | } |
963 | 961 | ||
964 | #ifdef DEBUG_DATA | 962 | #ifdef CONFIG_HID_DEBUG |
965 | { | 963 | { |
966 | int i; | 964 | int i; |
967 | printk(KERN_DEBUG __FILE__ ": report %d (size %u) = ", n, size); | 965 | 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 d6abe3494c04..89241be4ec9b 100644 --- a/drivers/hid/hid-debug.c +++ b/drivers/hid/hid-debug.c | |||
@@ -28,7 +28,6 @@ | |||
28 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic | 28 | * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic |
29 | */ | 29 | */ |
30 | 30 | ||
31 | //#include <linux/input.h> | ||
32 | #include <linux/hid.h> | 31 | #include <linux/hid.h> |
33 | 32 | ||
34 | struct hid_usage_entry { | 33 | struct hid_usage_entry { |
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 4824b19b8646..25d180a24fc4 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -31,8 +31,6 @@ | |||
31 | #include <linux/slab.h> | 31 | #include <linux/slab.h> |
32 | #include <linux/kernel.h> | 32 | #include <linux/kernel.h> |
33 | 33 | ||
34 | #undef DEBUG | ||
35 | |||
36 | #include <linux/hid.h> | 34 | #include <linux/hid.h> |
37 | #include <linux/hid-debug.h> | 35 | #include <linux/hid-debug.h> |
38 | 36 | ||
@@ -253,7 +251,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
253 | 251 | ||
254 | field->hidinput = hidinput; | 252 | field->hidinput = hidinput; |
255 | 253 | ||
256 | #ifdef DEBUG | 254 | #ifdef CONFIG_HID_DEBUG |
257 | printk(KERN_DEBUG "Mapping: "); | 255 | printk(KERN_DEBUG "Mapping: "); |
258 | hid_resolv_usage(usage->hid); | 256 | hid_resolv_usage(usage->hid); |
259 | printk(" ---> "); | 257 | printk(" ---> "); |
@@ -690,7 +688,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
690 | return; | 688 | return; |
691 | 689 | ||
692 | ignore: | 690 | ignore: |
693 | #ifdef DEBUG | 691 | #ifdef CONFIG_HID_DEBUG |
694 | printk("IGNORED\n"); | 692 | printk("IGNORED\n"); |
695 | #endif | 693 | #endif |
696 | return; | 694 | return; |