Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
authorLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Jun 2018 07:42:39 +0000 (16:42 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 20 Jun 2018 07:42:39 +0000 (16:42 +0900)
Pull HID fixes from Jiri Kosina:

 - Wacom 2nd-gen Intuos Pro large Y axis handling fix from Jason Gerecke

 - fix for hibernation in Intel ISH driver, from Even Xu

 - crash fix for hid-steam driver, from Rodrigo Rivas Costa

 - new device ID addition to google-hammer driver

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
  HID: wacom: Correct logical maximum Y for 2nd-gen Intuos Pro large
  HID: intel_ish-hid: ipc: register more pm callbacks to support hibernation
  HID: steam: use hid_device.driver_data instead of hid_set_drvdata()
  HID: google: Add support for whiskers

1  2 
drivers/hid/wacom_sys.c

diff --combined drivers/hid/wacom_sys.c
index c101369b51de88b927fdf2295f3bb664ed415899,545986cfb9788a9fe0872a4b342d1e39f2d4dae7..d6797535fff97217b477cf7c2009397dcce2d1ec
@@@ -395,6 -395,14 +395,14 @@@ static void wacom_usage_mapping(struct 
                }
        }
  
+       /* 2nd-generation Intuos Pro Large has incorrect Y maximum */
+       if (hdev->vendor == USB_VENDOR_ID_WACOM &&
+           hdev->product == 0x0358 &&
+           WACOM_PEN_FIELD(field) &&
+           wacom_equivalent_usage(usage->hid) == HID_GD_Y) {
+               field->logical_maximum = 43200;
+       }
        switch (usage->hid) {
        case HID_GD_X:
                features->x_max = field->logical_maximum;
@@@ -1363,7 -1371,7 +1371,7 @@@ static int wacom_led_groups_alloc_and_r
        if (!devres_open_group(dev, &wacom->led.groups[group_id], GFP_KERNEL))
                return -ENOMEM;
  
 -      leds = devm_kzalloc(dev, sizeof(struct wacom_led) * count, GFP_KERNEL);
 +      leds = devm_kcalloc(dev, count, sizeof(struct wacom_led), GFP_KERNEL);
        if (!leds) {
                error = -ENOMEM;
                goto err;
@@@ -1463,7 -1471,7 +1471,7 @@@ static int wacom_led_groups_allocate(st
        struct wacom_group_leds *groups;
        int error;
  
 -      groups = devm_kzalloc(dev, sizeof(struct wacom_group_leds) * count,
 +      groups = devm_kcalloc(dev, count, sizeof(struct wacom_group_leds),
                              GFP_KERNEL);
        if (!groups)
                return -ENOMEM;