Skip to content

Commit

Permalink
Merge branch 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/jikos/hid

* 'for-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jikos/hid:
  USB HID: handle multi-interface devices for Apple macbook pro properly
  HID: move away from DEBUG defines in favor of CONFIG_HID_DEBUG
  USB HID: fix bogus comment in hid_get_class_descriptor()
  USB HID: remove hid_find_field_by_usage()
  HID: API - fix leftovers of hidinput API in USB HID
  HID: hid debug from hid-debug.h to hid layer
  hid: force feedback driver for PantherLord USB/PS2 2in1 Adapter
  hid: quirk for multi-input devices with unneeded output reports
  hid: allow force feedback for multi-input devices
  • Loading branch information
Linus Torvalds committed Feb 6, 2007
2 parents 0c7d375 + a417a21 commit 2ac04a1
Show file tree
Hide file tree
Showing 12 changed files with 1,005 additions and 817 deletions.
14 changes: 14 additions & 0 deletions drivers/hid/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,19 @@ config HID

If unsure, say Y

config HID_DEBUG
bool "HID debugging support"
depends on HID
---help---
This option lets the HID layer output diagnostics about its internal
state, resolve HID usages, dump HID fields, etc. Individual HID drivers
use this debugging facility to output information about individual HID
devices, etc.

This feature is useful for those who are either debugging the HID parser
or any HID hardware device.

If unsure, say N

endmenu

11 changes: 2 additions & 9 deletions drivers/hid/Makefile
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
#
# Makefile for the HID driver
#

# Multipart objects.
hid-objs := hid-core.o hid-input.o

# Optional parts of multipart objects.
hid-objs := hid-core.o hid-input.o

obj-$(CONFIG_HID) += hid.o

ifeq ($(CONFIG_INPUT_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
endif
hid-$(CONFIG_HID_DEBUG) += hid-debug.o

8 changes: 3 additions & 5 deletions drivers/hid/hid-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@
#include <linux/input.h>
#include <linux/wait.h>

#undef DEBUG
#undef DEBUG_DATA

#include <linux/hid.h>
#include <linux/hiddev.h>
#include <linux/hid-debug.h>

/*
* Version Information
Expand Down Expand Up @@ -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

Expand All @@ -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);
Expand Down
Loading

0 comments on commit 2ac04a1

Please sign in to comment.