Merge branches 'debug-module-param' and 'upstream' into for-linus
Jiri Kosina [Mon, 9 Jul 2007 12:23:37 +0000 (14:23 +0200)]
1  2 
drivers/hid/Kconfig
drivers/hid/hid-input.c
drivers/hid/usbhid/hid-core.c
drivers/hid/usbhid/hid-quirks.c
include/linux/hid.h

Simple merge
@@@ -814,10 -882,20 +878,20 @@@ static void hidinput_configure_usage(st
                        field->dpad = usage->code;
        }
  
+       /* for those devices which produce Consumer volume usage as relative,
+        * we emulate pressing volumeup/volumedown appropriate number of times
+        * in hidinput_hid_event()
+        */
+       if ((usage->type == EV_ABS) && (field->flags & HID_MAIN_ITEM_RELATIVE) &&
+                       (usage->code == ABS_VOLUME)) {
+               set_bit(KEY_VOLUMEUP, input->keybit);
+               set_bit(KEY_VOLUMEDOWN, input->keybit);
+       }
        hid_resolv_event(usage->type, usage->code);
 -#ifdef CONFIG_HID_DEBUG
 -      printk("\n");
 -#endif
 +
 +      dbg_hid_line("\n");
 +
        return;
  
  ignore:
@@@ -772,22 -724,19 +724,17 @@@ static struct hid_device *usb_hid_confi
                return NULL;
        }
  
-       if ((quirks & HID_QUIRK_CYMOTION))
-               hid_fixup_cymotion_descriptor(rdesc, rsize);
-       if (quirks & HID_QUIRK_LOGITECH_DESCRIPTOR)
-               hid_fixup_logitech_descriptor(rdesc, rsize);
-       if (quirks & HID_QUIRK_SWAPPED_MIN_MAX)
-               hid_fixup_cypress_descriptor(rdesc, rsize);
+       usbhid_fixup_report_descriptor(le16_to_cpu(dev->descriptor.idVendor),
+                       le16_to_cpu(dev->descriptor.idProduct), rdesc,
+                       rsize, rdesc_quirks_param);
  
 -#ifdef CONFIG_HID_DEBUG
 -      printk(KERN_DEBUG __FILE__ ": report descriptor (size %u, read %d) = ", rsize, n);
 +      dbg_hid("report descriptor (size %u, read %d) = ", rsize, n);
        for (n = 0; n < rsize; n++)
 -              printk(" %02x", (unsigned char) rdesc[n]);
 -      printk("\n");
 -#endif
 +              dbg_hid_line(" %02x", (unsigned char) rdesc[n]);
 +      dbg_hid_line("\n");
  
        if (!(hid = hid_parse_report(rdesc, n))) {
 -              dbg("parsing report descriptor failed");
 +              dbg_hid("parsing report descriptor failed\n");
                kfree(rdesc);
                return NULL;
        }
Simple merge
Simple merge