Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: length resolution should be reported units/mm
HID: add support for F430 Force Feedback Wheel
HID: egalax: Use kzalloc
HID: Remove KERN_DEBUG from dbg_hid use

Manually fixed trivial conflict in drivers/hid/hid-input.c (due to
removal of KERN_DEBUG from dbg_hid use clashing with new keycode
interface switch)

+16 -10
+1
drivers/hid/hid-core.c
··· 1386 1386 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb651) }, 1387 1387 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb653) }, 1388 1388 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654) }, 1389 + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a) }, 1389 1390 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED, USB_DEVICE_ID_TOPSEED_CYBERLINK) }, 1390 1391 { HID_USB_DEVICE(USB_VENDOR_ID_TOPSEED2, USB_DEVICE_ID_TOPSEED2_RF_COMBO) }, 1391 1392 { HID_USB_DEVICE(USB_VENDOR_ID_TWINHAN, USB_DEVICE_ID_TWINHAN_IR_REMOTE) },
+1 -1
drivers/hid/hid-egalax.c
··· 221 221 struct egalax_data *td; 222 222 struct hid_report *report; 223 223 224 - td = kmalloc(sizeof(struct egalax_data), GFP_KERNEL); 224 + td = kzalloc(sizeof(struct egalax_data), GFP_KERNEL); 225 225 if (!td) { 226 226 dev_err(&hdev->dev, "cannot allocate eGalax data\n"); 227 227 return -ENOMEM;
+12 -9
drivers/hid/hid-input.c
··· 174 174 175 175 clear_bit(*old_keycode, dev->keybit); 176 176 set_bit(usage->code, dev->keybit); 177 - dbg_hid(KERN_DEBUG "Assigned keycode %d to HID usage code %x\n", 177 + dbg_hid("Assigned keycode %d to HID usage code %x\n", 178 178 usage->code, usage->hid); 179 179 180 180 /* ··· 203 203 * 204 204 * as seen in the HID specification v1.11 6.2.2.7 Global Items. 205 205 * 206 - * Only exponent 1 length units are processed. Centimeters are converted to 207 - * inches. Degrees are converted to radians. 206 + * Only exponent 1 length units are processed. Centimeters and inches are 207 + * converted to millimeters. Degrees are converted to radians. 208 208 */ 209 209 static __s32 hidinput_calc_abs_res(const struct hid_field *field, __u16 code) 210 210 { ··· 225 225 */ 226 226 if (code == ABS_X || code == ABS_Y || code == ABS_Z) { 227 227 if (field->unit == 0x11) { /* If centimeters */ 228 - /* Convert to inches */ 229 - prev = logical_extents; 230 - logical_extents *= 254; 231 - if (logical_extents < prev) 228 + /* Convert to millimeters */ 229 + unit_exponent += 1; 230 + } else if (field->unit == 0x13) { /* If inches */ 231 + /* Convert to millimeters */ 232 + prev = physical_extents; 233 + physical_extents *= 254; 234 + if (physical_extents < prev) 232 235 return 0; 233 - unit_exponent += 2; 234 - } else if (field->unit != 0x13) { /* If not inches */ 236 + unit_exponent -= 1; 237 + } else { 235 238 return 0; 236 239 } 237 240 } else if (code == ABS_RX || code == ABS_RY || code == ABS_RZ) {
+2
drivers/hid/hid-tmff.c
··· 256 256 .driver_data = (unsigned long)ff_joystick }, 257 257 { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb654), /* FGT Force Feedback Wheel */ 258 258 .driver_data = (unsigned long)ff_joystick }, 259 + { HID_USB_DEVICE(USB_VENDOR_ID_THRUSTMASTER, 0xb65a), /* F430 Force Feedback Wheel */ 260 + .driver_data = (unsigned long)ff_joystick }, 259 261 { } 260 262 }; 261 263 MODULE_DEVICE_TABLE(hid, tm_devices);