]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/hid/hid-debug.c
[TCP]: Add tcp_left_out(tp) "back" to get cleaner looking lines
[linux-2.6-omap-h63xx.git] / drivers / hid / hid-debug.c
index 83c4126b37c333f59b575a40dce9f6fd1d2b675b..a13757b7898028986f98739eecfb3649be96bdfd 100644 (file)
@@ -347,6 +347,9 @@ static void resolv_usage_page(unsigned page) {
 void hid_resolv_usage(unsigned usage) {
        const struct hid_usage_entry *p;
 
+       if (!hid_debug)
+               return;
+
        resolv_usage_page(usage >> 16);
        printk(".");
        for (p = hid_usage_table; p->description; p++)
@@ -369,6 +372,9 @@ __inline__ static void tab(int n) {
 void hid_dump_field(struct hid_field *field, int n) {
        int j;
 
+       if (!hid_debug)
+               return;
+
        if (field->physical) {
                tab(n);
                printk("Physical(");
@@ -466,6 +472,9 @@ void hid_dump_device(struct hid_device *device) {
        unsigned i,k;
        static char *table[] = {"INPUT", "OUTPUT", "FEATURE"};
 
+       if (!hid_debug)
+               return;
+
        for (i = 0; i < HID_REPORT_TYPES; i++) {
                report_enum = device->report_enum + i;
                list = report_enum->report_list.next;
@@ -489,6 +498,9 @@ void hid_dump_device(struct hid_device *device) {
 EXPORT_SYMBOL_GPL(hid_dump_device);
 
 void hid_dump_input(struct hid_usage *usage, __s32 value) {
+       if (!hid_debug)
+               return;
+
        printk("hid-debug: input ");
        hid_resolv_usage(usage->hid);
        printk(" = %d\n", value);
@@ -758,6 +770,9 @@ static char **names[EV_MAX + 1] = {
 
 void hid_resolv_event(__u8 type, __u16 code) {
 
+       if (!hid_debug)
+               return;
+
        printk("%s.%s", events[type] ? events[type] : "?",
                names[type] ? (names[type][code] ? names[type][code] : "?") : "?");
 }