From: Jiri Kosina Date: Mon, 9 Jul 2007 12:23:37 +0000 (+0200) Subject: Merge branches 'debug-module-param' and 'upstream' into for-linus X-Git-Tag: v2.6.23-rc1~1200^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=feb485d4010e450183bd422d90c0d0f6be98f932;p=linux-2.6 Merge branches 'debug-module-param' and 'upstream' into for-linus --- feb485d4010e450183bd422d90c0d0f6be98f932 diff --cc drivers/hid/hid-input.c index 38595d3935,bf7e307503..8edbd30cf7 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c @@@ -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: diff --cc drivers/hid/usbhid/hid-core.c index 1eb2c64bc4,3efc3734ce..3afa4a5035 --- a/drivers/hid/usbhid/hid-core.c +++ b/drivers/hid/usbhid/hid-core.c @@@ -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; }